# fresh launched precise instance TEST_PPA="ppa:ubuntu-server-ec2-testing-dev/testing" ## enable proposed and install python-software-properties ## echo "deb http://archive.ubuntu.com/ubuntu/ precise-proposed main" | sudo tee /etc/apt/sources.list.d/precise-proposed.txt ## for ppa, instead of above do ## ## sudo apt-add-repository -y ppa:smoser sudo apt-get update --quiet sudo apt-get install --assume-yes python-software-properties # verify you're prompted for adding a ppa # you should see a message with info about the ppa. hit ctrl-c. sudo apt-add-repository $TEST_PPA # add again, this time saying 'yes' sudo apt-add-repository $TEST_PPA sudo apt-get update # install a package from that archive. sudo apt-get install smello sudo apt-get --purge remove smello # remove the archive, then verify apt-cache doesnt know of 'smello' anymore sudo apt-add-repository --remove $TEST_PPA sudo apt-get update # look for 'smello' (to verify archive removed) # this should fail with 'Unable to locate package smello' apt-cache policy smello ## verify '-y' works. You should not be prompted, and apt-cache policy ## should show smello again. sudo apt-add-repository -y $TEST_PPA sudo apt-get update apt-cache policy smello ## add and remove each of the openstack release pockets and the 'tools' pocket for tok in folsom grizzly havana icehouse; do sudo apt-add-repository -y cloud-archive:$tok sudo apt-get update -qy sudo apt-add-repository --remove cloud-archive:$tok sudo apt-get update -qy done # the first of the above should have installed 'ubuntu-cloud-keyring'. # verify it installed. dpkg-query --show ubuntu-cloud-keyring # because of the way apt-add-repository works, you'll still have files in # /etc/apt/sources.list.d named cloudarchive-*.list* # you can just remove them. echo /etc/apt/sources.list.d/cloudarchive-*.list* sudo rm /etc/apt/sources.list.d/cloudarchive-*.list* ## now verify you're prompted if you didn't do '-y' ## you should see a message pointing you to ## https://wiki.ubuntu.com/ServerTeam/CloudArchive and be given ## the choice to 'ctrl-c' to quit. sudo apt-add-repository cloud-archive:havana