Hello,
On my CentOS 7 and CentOS 8 systems, I want to remove the Samba packages without affecting other dependent packages.
Is it safe to use the --nodeps parameter for this? Has anyone had experience with this?
rpm -e --nodeps samba-client
Hello,
On my CentOS 7 and CentOS 8 systems, I want to remove the Samba packages without affecting other dependent packages.
Is it safe to use the --nodeps parameter for this? Has anyone had experience with this?
rpm -e --nodeps samba-client
Short answer:
Do not use --nodeps unless you are certain none of your system's critical services depend on the Samba client. Removing RPMs with --nodeps skips all dependency checks and can break packages that depend on Samba. This is generally unsafe and not recommended in production or multi-user systems.
Without --nodeps:
rpm -e samba-client
This will refuse to uninstall if there are any installed packages depending on samba-client. It’s the safe, default behavior.
With --nodeps:
rpm -e --nodeps samba-client
This forces removal without checking or removing dependencies. Any packages depending on samba-client (directly or indirectly) will be left in a broken state, potentially causing system or application failures.
On CentOS 7/8, the recommended way to remove packages and their dependencies is with yum or dnf:
yum remove samba samba-client
or
dnf remove samba samba-client
These tools track dependencies and will prompt you with a list of packages to be removed, allowing you to cancel if you see anything critical.
--nodepsSummary:
Using --nodeps to remove Samba is not safe unless you are absolutely sure nothing else depends on it and you accept the risk of breaking system packages. Use yum remove or dnf remove for safe dependency handling.