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
Possibly-Related Posts

Responses

March 17th, 2011

Anonymous

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

March 17th, 2011

Daniel Howard

That it did, aye.

August 18th, 2011

Some

it worked for me, i just doing it now!

August 18th, 2011

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.

February 13th, 2012

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

October 16th, 2012

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.

October 16th, 2012

ylk

Is the kernel included?

Comment

Leave a comment . . .

Tiny Print:

  1. For private messages, e-mail me: dannyman@toldme.com.
  2. You must provide an e-mail address.
  3. You can use a bogus e-mail address, but I like to know who you are.
  4. I will not spam you. I will not publish or share your e-mail address.
  5. First-time commenters will be held for review.
  6. You can use these HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>