There can be number of reasons why someone would want to uninstall Samba from its Linux machine. One of the reasons can be to remove and reinstall Samba because a fresh installation sometimes solves certain issues. Another reason is if you no longer want to use it for file sharing. Whatever the reason may be, you can completely uninstall Samba from your Linux machine.
In this post, we will cover the process on how to remove and uninstall Samba from Ubuntu OS. Let’s get started.
First, run this command to see if Samba is installed on your machine:
The version number in the output confirms that you have Samba installed in your system.
Follow the method mentioned below to uninstall or remove Samba from your Ubuntu machine.
You may be asked to enter the pseudo password. Type the password and hit Enter. Then it might ask if you want to continue the operation. Type y and hit Enter to continue.
This should remove Samba from your Ubuntu machine.
There are two other Samba packages Samba-common and Samba-common-bin that are also installed along with Samba. You can also remove those packages through the command below:
It might ask if you want to continue the operation. Type y and hit Enter to continue.
This should remove Samba-common and Samba-common-bin packages from your Ubuntu machine.
To remove the dependencies that were automatically installed along with Samba installation, run the command below:
When prompted for confirmation, type y and hit Enter.
If you want to remove Samba along with the configuration files, you will have to use the purge command. Run the command below to purge Samba:
It might ask if you want to continue the operation. Type y and hit Enter to continue.
Sometimes, the purge command does not delete some Samba directories because they are not empty. To delete those directories too, run the command below:
This post covered how to remove and uninstall Samba from Ubuntu. It also covered how to purge Samba if you want to delete the configuration files of Samba as well.
Canonical Livepatch is a security patching automation tool which supports reboot-less security updates for the…
Apache Spark has always been very well known for distributing computation among multiple nodes using…
Data centers are popping up everywhere. With the rapid growth of AI, cloud services, streaming…
Our commitment to building a thriving open source community is stronger than ever. We believe…
The clock was ticking: Node.js 18’s upstream End of Life (EOL) The OpenJS Foundation is…
June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…