codeblog

9/26/2007

stupid dpkg tricks when fighting XFS bugs

Filed under: Ubuntu — kees @ 3:26 pm

A few days ago, I found myself with corrupted libraries and other insanity after doing a “dist-upgrade”. As it turns out, my filesystem was to blame. After running xfs_repair on it, I used a handy short-cut to re-install all the packages that might have gotten caught in the breakage:

sudo apt-get –reinstall install $(grep ^2007-09-24 /var/log/dpkg.log | cut -d\ -f4)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Technorati
  • Identi.ca
  • Reddit
  • Twitter

2 Comments »

  1. I’ve this one written on my notes:

    apt-get install –reinstall `dpkg –get-selections | grep install | awk ‘{print $1};’`

    hoping the comment system will not mangle it

    Comment by Andrea — 9/27/2007 @ 12:04 am

  2. Hi,
    Nice one, thanks. On my system (t.04) it’s actually:
    grep ^2007-09-24 /var/log/dpkg.log | cut -d ‘ ‘ -f5

    Comment by zen — 9/27/2007 @ 6:20 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress