To disable and remove all Network File System (NFS) services on a Linux system, you can follow these steps:
nfs-server
service by running the following command:sudo systemctl stop nfs-server
nfs-server
service from starting automatically at boot by running the following command:sudo systemctl disable nfs-server
nfs-lock
service by running the following command:sudo systemctl stop nfs-lock
nfs-lock
service from starting automatically at boot by running the following command:sudo systemctl disable nfs-lock
nfs-idmap
service by running the following command:sudo systemctl stop nfs-idmap
nfs-idmap
service from starting automatically at boot by running the following command:sudo systemctl disable nfs-idmap
nfs-utils
package, which contains the NFS server and client utilities, by running the following command:sudo yum erase nfs-utils
or
sudo dnf erase nfs-utils
This will remove the nfs-utils
package and all NFS server and client utilities from your system.
Note: These steps will disable and remove all NFS services from your system. If you want to keep NFS client functionality but disable the NFS server, you can skip steps 1 through 6 and only uninstall the
nfs-utils
package. This will remove the NFS server but keep the NFS client utilities.