apt makes it easy to track the new package but hard to dump the old
On Sat, 02 Apr 2011 20:27:19 -0400 (EDT), email@example.com wrote:
> Why do I always have to clean up older versions by hand?
> E.g., linux-doc-2.6 pulls in the latest version automatically,
> but if I don't want an ever growing number of older versions accruing, I
> have to remove them by hand.
> # apt-show-versions -r -p ^linux-doc
> linux-doc-2.6/unstable uptodate 1:2.6.38+33
> linux-doc-2.6.37 2.6.37-2 installed: No available version in archive
> linux-doc-2.6.38/unstable uptodate 2.6.38-2
> Sure 'do aptitude purge ~o often.' But that is still by hand.
> Why does apt make it easy to add the new version but lacks facilities to
> clean up the old versions? Safety yes. But still not environmentally friendly.
Perhaps the "--purge-unused" option of aptitude is what you are looking for.
aptitude --purge-unused full-upgrade
If you don't want to have to remember to specify "--purge-unused" every time,
you can set the "Aptitude::Purge-Unused" option in /etc/apt/apt.conf.
If you use apt-get instead of aptitude, the corresponding option is simply
"--purge". For example,
apt-get --purge dist-upgrade
The corresponding configuration option would be "APT::Get::Purge".
.'`. Stephen Powell
: :' :
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org
Archive: 37884923.1903235.1301799801509.JavaMail.root@md01. wow.synacor.com">http://lists.debian.org/37884923.1903235.1301799801509.JavaMail.root@md01. wow.synacor.com