Ubuntu – How to reinstall a apt-get dist-upgrade

dist-upgradeinstallationpackage-management

I already have the latest version of Ubuntu 12.04.1. I want to reinstall every package again (a dist-upgrade reinstall). How do i do that?

sudo apt-get dist-upgrade only works one time. I want to reinstall again (to fix some things I broke in ubuntu).

Best Answer

For broken packages

sudo dpkg --configure -a

and

sudo apt-get install -f

Reinstall package

sudo apt-get install --reinstall <package name>

Note

If the problem of a broken package still exist the solution is to edit the dpkg status file manually.

sudo nano /var/lib/dpkg/status

Locate the corrupt package, and remove the whole block of information about it and save the file.

Related Question