Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to remove samba, I've tried using

apt-get --purge samba

Which according to the man page is supposed to delete .conf files. However smb.conf is still there.

Any tips on how to remove all related files/directories?

share|improve this question
Purge removes only files which are installed during the package installation. If the smb.conf is generated by you or by samba itself, then this file is not automatically removed. – Michael K Dec 14 '11 at 8:39
up vote 3 down vote accepted

First of all, you missed a word, you should use

sudo apt-get --purge remove samba

or simply

sudo apt-get purge samba

By the way, the configuration file is created and removed in the Post Installation/Remove scripts of the samba-common package, a package that is installed by default because needed also for the samba client.

So the smb.conf file would only be automatically removed if you remove that package, but it is not advisable to do so without breaking the default installation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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