Telling apt not to delete old packages that are no longer in a repository

Panu Matilainen pmatilai at laiskiainen.org
Wed Apr 18 23:12:44 PDT 2007


On Wed, 18 Apr 2007, Johannes Kastl wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I am looking for a way to tell apt (Version apt-0.5.15lorg3.2-34.1 on
> Suse 10.2 and 9.3) to NOT delete packages that are no longer available
> in a repository.
>
> Til now I got the answer that putting
>
> {
>  Clean "never";   // always|auto|prompt|never
> };
>
> into apt.conf should do the trick, but it doesnt. No matter where I
> put the apt.conf. By default there is one in
> /etc/apt/apt.conf.d/apt.conf, I tried a copy in /etc, but that also
> didnt work.
>
> Right now the apt.conf is the same on 9.3 and 10.2, and both return
>
> DSelect "";
> DSelect::Clean "never";
>
> when running apt-config dump, so I assume it is recognized.

DSelect.. that's debian-stuff. You can put pretty much any arbitrary junk 
and apt wont complain, it only actually uses what it recognizes so 
apt-config dump showing something doesn't mean much.

To disable the "smart autocleaner" (originally introduced in 0.5.15cnc7 
IIRC) use this in apt config:

APT::Get::Archive-Cleanup "false";

 	- Panu -



More information about the Apt-Rpm mailing list