RE: Re: Automatic removing of unneeded .deb files?
Barry, Christopher wrote:
> am I misunderstanding the option specified here, copied from apt-get
> 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 option APT::Clean-Installed will
> prevent installed packages from being erased if it is set to off.
> Will this configuration option not do what you want? OR, will it keep
> everything, installed included? If it won't work, it would be a whole
> lot less effort to get a bigger hard drive ;)
As I said I am very much aware of autoclean (and use it quite often), but it
is not what I would like to get. If I can put here small mockup of the
proposed utility in semi-Pythonish manner?
currentlyInstalled = pipe("aptitude search -F '%p %V' '~i'").split()
packagesStoredNames = pipe("ls *.deb").split("_",1)
storedNotInstalled = [x for x in packagesStoredNames \
if not(x in currentlyInstalled)]
for file in storedNotInstalled:
Actually, when I am looking at it, it is almost whole script :-).
Matej Cepl, http://www.ceplovi.cz/matej/blog/
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
In political activity men sail a boundless and bottomless sea;
there is neither harbor for shelter nor floor for anchorage,
neither starting point nor appointed destination.
-- Michael Oakeshott: Rationalism in Politics