dannyman.toldme.com


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

Next:
Previous:
Categories: Linux, Technical

  • Anonymous

    Year old post, but I’m assuming that worked for you then?

  • http://dannyman.toldme.com/ Daniel Howard

    That it did, aye.

  • Some

    it worked for me, i just doing it now!

  • Some

    this my also work in the case of a fresh install, you save all the packages in a file, and call it from there in your fresh installation.

  • guest

    awesome trick, if you saw my bash script to do the same you’d laugh! saved me after invoking a nice rsync command which started deleting everything in my HD :D

  • ylk

    “After some transient disk issues I was stuck with an Ubuntu VMWare image that was brain dead.”

    Did reinstalling all installed packages fix the VMWare image problem? I ask because
    I’m having a similar problem (but with VirtualBox image) after my root (/) partition ran low on disk space.

  • ylk

    Is the kernel included?