I have been playing with package management by adding sources from older Ubuntu releases in order to get older versions of some software (e.g. PHP). Unfortunately at some point I must have overdid it as now every attempt to use apt-get or synaptic ends in an error message being displayed saying that there is no candidate available to install.

I would like to start fresh - remove all the installed packages and added sources. Is there a quick way to do this, or do I need to reinstall the OS?

  • 4
    This is called re-install, isn't it? :D
    – txwikinger
    Commented Jul 28, 2010 at 20:14

3 Answers 3


You can do an installation of Ubuntu over top of an existing installation. You'll lose all of your (non-local [1]) system files and applications, but it will preserve everything in /home.

Select the advanced partitioning option from the menu of either the desktop CD installer or the alternate CD installer. Set the mountpoint of your existing root partition to / and make sure the format box is not checked. Repeat these steps for your home partition, if you have one.

1: Where local system directories would be /usr/src, /usr/local, and /var/local.


You could always remove all packages (making a few exceptions for apt-get, etc.)

Then run:

sudo apt-get install ubuntu-desktop

This installs the desktop metapackage which has pretty much every other package as a dependency.


Remove all but the current release of Ubuntu you're running from /etc/apt/sources.list. Then sudo apt-get update; sudo apt-get dist-upgrade. Let me know if you still have trouble.

You may have to reinstall.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .