42

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) ?

2
  • I thought you had to purge it
    – Dr_Bunsen
    Jun 6 '12 at 14:19
  • Ah! 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. Jan 8 '18 at 17:53
56

Use sudo apt-get purge <program> instead, to remove config files as well.

27

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 removed the package.

4
  • 2
    I 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/…
    – codeling
    Jun 6 '12 at 14:03
  • 2
    Does sudo apt-get remove --purge <program> have the same effect? Dec 26 '12 at 21:47
  • 2
    @asymptotically Yes. Quoting the apt-get man page: "remove --purge is equivalent to the purge command". If you want to know everything about the apt-get command, run man apt-get.
    – JW.
    Dec 28 '12 at 16:26
  • I did notice that a file /etc/vsftpd.conf.save is created and remains after the purge. This should be the accepted answer. Dec 13 '16 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.