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

Re: Automatic removing of unneeded .deb files?

Matej Cepl wrote (Tue 2005-Nov-22 18:25:08 -0500):

> aptitude clean (deletes everything; too much, I want to have .deb files for
> all currently installed programs on my notebook -- I have not always ideal
> connection to the Internet -- read dial-up) or aptitude autoclean (leaves
> anything which is download*able*). I would love to have something in
> between -- something less aggressive than clean and more aggressive than
> autoclean...

Summing up: You want to keep the .deb files for all installed
packages, but no other .deb files.

"autoclean" can do one half of this (keeping .deb files for
installed packages), if called with "APT::Clean-Installed"
turned off (by either passing "APT::Clean-Installed=off" as an
option to apt-get or adding "APT::Clean-Installed off;" to

The other half (removing all other packages) can be done by
using "autoclean" while temporarily removing the contents of

What I am doing manually every once in a while is:

  cd /etc/apt
  mv sources.list sources.list_gone
  touch sources.list
  apt-get -o"APT::Clean-Installed=off" autoclean
  mv sources.list_gone sources.list

(Though I do have "APT::Clean-Installed off;" set in apt.conf,
so I am actually only issuing an "apt-get autoclean" command.)

Cheers, Marcus

   Marcus C. Gottwald  ·  http://www.inf.fu-berlin.de/~gottwald/

Reply to: