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

Re: Automatic removing of unneeded .deb files?



Matej Cepl wrote:

Hi,

I am trying to keep some order in my /var/cache/apt/archives/ and while
doing that I have not found a way how *automatically* clean this directory
of all unneeded .deb files. I mean, I have tested many packages which I
have later found unnecessary. I know that these will eventually be
autocleaned by aptitude (because they won't get refreshed while upgrading
and they will eventually get obsolete), but I would love to have some more
instant solution. Did anybody create a script which would erase
from /v/c/a/a/ all .deb files which are not currently installed?

Yes, I know I can do this with little scripting of 'aptitude search', but
call me lazy I would love to have already done solution.

Thanks a lot for any response,

Matej
Hello,

If you issue an

apt-get clean

it will clean out the cached files. I believe that you can set this in /etc/apt/apt.conf as well to do this every time you run apt.

Cheers
-Mark

--------------
clean clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When APT is used as a dselect(8) method, clean is run automatically. Those who do not use dselect will likely want to
             run apt-get clean from time to time to free up disk space.

      autoclean
Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control. The configuration op- tion APT::Clean-Installed will prevent installed packages from being erased if it is set to off.




Reply to: