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.
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
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