20
13
I have been uninstalling applications as well as removing or purging their configuration files using the command apt-get --purge remove {package_name}
.
I have come across several posts on the net including Ubuntu's guide at https://help.ubuntu.com/community/AptGet/Howto that reads "This command completely removes a package and the associated configuration files. Configuration files residing in ~ are not usually affected by this command"
when just using the command apt-get purge {package_name}
.
Is there a difference in running the command apt-get --purge remove {package_name}
and apt-get purge {package_name}
? Why would you use one over the other?
2
You can purge data from removed packages using
– etam1024 – 2016-01-08T21:41:00.327dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge
(command from https://help.ubuntu.com/community/AptGet/Howto)@etam1024 sure, and there are other ways too. The above just mentions a method to do it in a single operation with autoremove. – Zoredache – 2016-01-08T21:50:28.370
I don't think you understood. As you wrote autoremove removes packages, but "you will have lots of old crufty configs from those packages, since you just removed them". The command I pasted deletes those files. So the commands
apt-get autoremove
and the one pasted together in this order behave like autopurge. – etam1024 – 2016-01-09T18:05:23.157