How do I completely remove and reinstall Samba on Debian?
68,367
Solution 1
sudo apt-get purge samba
will remove the entire package, along with configuration files, which apt-get remove samba
won't. After the purge, reinstall samba using
sudo apt-get install samba
from man apt-get
:
purge
purge is identical to remove except that packages are removed and
purged (any configuration files are deleted too).
Solution 2
On Ubuntu (17) I did
apt purge samba samba-common
followed by
apt install system-config-samba
which worked for me.
Related videos on Youtube
Author by
Jane Panda
Updated on September 17, 2022Comments
-
Jane Panda almost 2 years
My Samba installation has become a mess, and now the services won't even start correctly anymore, for some reason.
Is there a way to completely remove Samba, as if it was never there, and then reinstall it so I can have a fresh setup?
-
Jane Panda almost 14 yearsWell it looks like that sort of worked, but now it seems to have hung on "Starting Samba daemons: nmbd smbd". I didn't see any errors before that, but to be fair it went by fairly quick, heh.
-
Pylsa almost 14 years@Bob you may need a reboot
-
Jane Panda almost 14 yearsAwesome, that did the trick! I guess sometimes rebooting -does- work on *nixy stuff. Thanks!
-
Pylsa almost 14 years@Bob Great it worked for you! Good luck with your fresh samba install! Haha! ;)
-
Antônio Medeiros almost 7 yearsDebian 9.0 does not have a package called
system-config-samba
. But the hint of the packagesamba-common
saved my day! So what I did was (as root)apt purge samba samba-common
,apt --purge autoremove
and finallyapt-get install samba
. -
Sanjok Gurung over 5 yearsThis worked for me in Ubuntu 14.04