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

apt, aptitude: By default purge config of removed packages ?



Hello,

I'm not on this list -- please cc.

I always wondered about the masses of packages with 'c' flag (config files left) in my package database. I'm mostly using aptitude for updates and maintenance, so this is on behalf of the way aptitude calls apt.

I use to clean the configs (including documentation AFAIR) manually from time to time using the ~c search in aptitude, but i'm sure there's a smarter solution. Thinking about it, it really should be done automaticly. 

I can understand that it's critical to use 'purge' as default, because some important package config may be reomoved which one could regret later.

But i'm talking about (mainly) libs which frequently change, and which i never ever tweak, and i also would not need the docs, at least not after they are removed.

But even if, then it's still only critical if i modified a config manually. But can't manually modified configuration files easily be detected as such ? The package scripts preparing updates apparently are doing it since long.

So, basically it should be possible to tell apt that any packages, which configs are 'untouched', should be purged instead of only removed.

SO..... Is there any apt.conf option, or some apt.conf script injection telling apt to 'purge' ?

If that's not the case, then what would be the next 'smart' approach ? 

Some postremoval script in apt.d ? But wouldn't that be called after every single apt action, triggering an additional action (of dpkg, in this case, it doesn't seem to be possible to use apt for 'purge ~c), and thus slow down performace ? 

What i imagine, however, (as workaround) is a single action, performed once after all apt actions are completed.

And would some apt inbuild option not still be a good idea, and maybe worth a feature request ?

Many thanks for enlightenment...

Micha


Reply to: