[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 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), jidanni@jidanni.org 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.
For example,

   aptitude update
   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    
 : :'  :
 `. `'`

Reply to: