Re: Solutions for the Apache upgrade hell
On Mon, Jul 14, 2014 at 09:52:12AM -0700, Russ Allbery wrote:
> 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.
Slightly better might be
dpkg --get-selections | awk '{if ($2 == "deinstall") { print $1 } }'
though I see there's a way to say this in aptitude to directly say what
you want.
Jeff
Reply to: