HowTo purge unused configuration files

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

HowTo purge unused configuration files

Postby kwevej on Thu Feb 17, 2011 6:31 am

Debian packaging system is designed to keep configuration files when a package is removed. That way if you reinstall it, you won’t have to redo the configuration. That’s a nice feature but what if you will never reinstall those packages?


list them:
Code: Select all
dpkg-query -f '${Package} ${Status}\n' -W | grep config-files$ | cut -d" " -f1


purge them:
Code: Select all
apt purge `dpkg-query -f '${Package} ${Status}\n' -W | grep config-files$ | cut -d" " -f1 | xargs`


source:
http://raphaelhertzog.com/2011/01/31/de ... ion-files/
User avatar
kwevej
Level 5
Level 5
 
Posts: 624
Joined: Mon Mar 22, 2010 3:35 pm
Location: Delft / Prague [@ LMDE]

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 5 guests