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

Re: dpkg --compare-versions

On Tue, 1 Jun 1999, Michael Merten wrote:

> I set up the /etc/apt/apt.conf file to turn off the autoclean feature
> when using dselect, and as a result, my /var/cache/apt/archives
> directory is growing quite large.  I decided to write a script that 
> uses "dpkg --compare-versions" automatically clean out the older
> versions of package files.  Here's the script I came up with...
> it doesn't actually delete anything yet...

You do realize that this is exactly what the apt-get autoclean feature

The trouble you are having is that APT renames files to their proper full
name including arch and epochs by escaping special characters with a %,
when it goes to re-read the directory it can reassemble the correct
versions of everything.

Autoclean removes any version that is no longer present in the archive
which is one step further than what you are doing here.


Reply to: