codeblog code is freedom — patching my itch

September 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)

© 2007, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.
CC BY-SA 4.0

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 — September 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 — September 27, 2007 @ 6:20 am

Powered by WordPress