Linux, Technical

Ubuntu: Re-install All Packages

After some transient disk issues I was stuck with an Ubuntu VMWare image that was brain dead. I figured I would give the install CD a chance to fix but the Ubuntu install CD doesn’t have a fix-it option. (Really?!) Since the issue was somewhere in how Gnome and X were configured, I launched an xterm session and managed this command:

dpkg --get-selections \* | awk '{print $1}' | xargs -l1 aptitude reinstall

What that does is get a list of all packages installed on a system, then invoke “reinstall” for each package. It took a few hours to run.

The Ubuntu forums had a recipe using some more straightforward Debian incantation, but that didn’t work for me.

Read More

Categories: Linux, Technical