On 2014-07-14 18:52 +0200, Russ Allbery wrote: > Thorsten Glaser <t...@debian.org> writes: > >> * Running dist-upgrade without --purge will keep packages in 'rc' >> state around, which a later APT call will not even recognise; >> you need to manually "dpkg --purge pkg1 pkg2 ..." to get rid >> of them > > I use apt dist-upgrade normally and then, periodically, run: > > dpkg --get-selections | grep deinstall | awk '{ print $1 }' \ > | xargs dpkg --purge > > This is obviously somewhat unsafe. It would be neat to have a tool that > would do this properly without involving dodgy greps that might match > package names and other obvious issues. It's not particularly hard to > turn this rune into a real script with error checking, but it would be > nice to have this functionality built into apt somehow, but to not have to > do it at the same time as the upgrade due to issues such as those on this > thread.
Note that aptitude can already do this, this is what I run regularly: # aptitude purge "~c" Getting at least some of aptitude's extensive search patterns[1] into apt would certainly be very useful. Cheers, Sven 1. http://aptitude.alioth.debian.org/doc/en/ch02s04s05.html -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87k37foohf....@turtle.gmx.de