Re: Deleting unused configuration files
John Merchant ha scritto:
Hello all, I have a lot of unused configuration files left in /etc from
removed packages. Is there any way I can automatically remove them all?
You can get the list of all removed but not purged packages with:
$ dpkg -l | awk '/^rc/{print $2}'
or, in case you prefer aptitude:
$ aptitude search '~c'
You just have to put one of the above commands in a for loop:
# for pack in $(dpkg -l | awk '/^rc/{print $2}'); do dpkg -P $pack; done
--
Kind regards,
Marco Romano.
Reply to: