To disable or remove all NFS (Network File System) services on a Debian or Ubuntu system, you can use the following steps:
nfs-kernel-server
service and set it to not start at boot:sudo service nfs-kernel-server stop sudo update-rc.d nfs-kernel-server disable
nfs-common
service and set it to not start at boot:sudo service nfs-common stop sudo update-rc.d nfs-common disable
apt-get
command with the purge
option:sudo apt-get purge nfs-kernel-server nfs-common
This will remove the NFS server and client packages and their configuration files from your system.
Note: Disabling or removing the NFS services may affect other programs or services that rely on NFS. Be sure to carefully consider the impact of these changes before making them. It is generally recommended to only disable or remove NFS services if they are not needed on your system.