sudo apt-get remove does not remove config files
130,163
Solution 1
Use sudo apt-get purge <program>
instead, to remove config files as well.
Solution 2
You're looking for purge:
sudo apt-get purge vsftpd
will also delete the config files. You can do this even after you've already remove
d the package.
Related videos on Youtube
Author by
Daniel
Updated on September 18, 2022Comments
-
Daniel almost 2 years
I'm new to Linux/Ubuntu - and I'm wondering if the behaviour I'm seeing is as designed. I have installed vsftpd:
sudo apt-get install vsftpd
Then I remove:
sudo apt-get remove vsftpd
However, looking in /etc I can see that vsftpd.conf is still present. Can someone explain why this is happening (I am assuming the remove would remove all files relating to vsftpd) ?
-
Dr_Bunsen about 12 yearsI thought you had to purge it
-
Gabriel Staples over 6 yearsAh! So that's how you remove something without removing config files! That's what I want to do...just in case I decide to reinstall later.
-
-
codeling about 12 yearsI believe there is even some option of dpkg to list all the packages that were once installed but removed...? Ah yes, see here: ascending.wordpress.com/2007/04/10/…
-
sal over 11 years@asymptotically Yes. Quoting the apt-get man page: "
remove --purge
is equivalent to thepurge
command". If you want to know everything about the apt-get command, runman apt-get
. -
Oliver Williams over 7 yearsI did notice that a file
/etc/vsftpd.conf.save
is created and remains after the purge. This should be the accepted answer.