Re: Removing old versions
Andre Costa <[email protected]> Thu, 13 Jan 2005 14:35:28 -0200
| Newsgroups | gmane.linux.conectiva.apt-rpm |
|---|---|
| Organization | TecGraf |
| Message-ID | <[email protected]> |
Thks Rex, comments below: On Thu, 13 Jan 2005 08:35:49 -0600 Rex Dieter <[email protected]> wrote: > Andre Costa wrote: > > > I use apt regularly to update our machines, and older versions are > > accumulating on /var/cache/apt/archives: > ... > > Is there any way of dealing with it (i.e. removing all but latest > > version) directly with apt or will I have to try some shell scripts > > to handle this? > > $ apt-get autoclean I tried autoclean before. I thought this would help me, but I was wrong: according to the man page, it only removes packages that cannot be downloaded anymore. Since many of the old packages still can be downloaded, autoclean does nothing for me (i.e. it still leaves all old packages installed): [root@camboinhas root]# ls -1 /var/cache/apt/archives/syslinux_* /var/cache/apt/archives/syslinux_2.11-1.1.fc1.dag_i386.rpm /var/cache/apt/archives/syslinux_2.11-2.1.fc1.dag_i386.rpm /var/cache/apt/archives/syslinux_2.13-1.1.fc1.rf_i386.rpm /var/cache/apt/archives/syslinux_3.02-1.1.fc1.rf_i386.rpm /var/cache/apt/archives/syslinux_3.06-1.1.fc1.rf_i386.rpm [root@camboinhas root]# apt-get autoclean Reading Package Lists... Done Building Dependency Tree... Done [root@camboinhas root]# ls -1 /var/cache/apt/archives/syslinux_* /var/cache/apt/archives/syslinux_2.11-1.1.fc1.dag_i386.rpm /var/cache/apt/archives/syslinux_2.11-2.1.fc1.dag_i386.rpm /var/cache/apt/archives/syslinux_2.13-1.1.fc1.rf_i386.rpm /var/cache/apt/archives/syslinux_3.02-1.1.fc1.rf_i386.rpm Am I missing something? > and, > $ apt-get clean > removes all stuff from /var/.../archives Yeah, I know, but this would be too much. I still want to have one (and only one -- the latest) RPM for each package installed. This same machine serves RPMs internally for others on our network, so I don't wanna remove everything. Thks, Andre -- Andre Oliveira da Costa ([email protected])