Can We Delete Swap File from Linux?
Contents the Swap File Name Is Removed So That It Is No Longer Available for Swapping. the File Itself Is Not Deleted. Edit the /Etc/Vfstab File and Delete the...
The swap file name is removed so that it is no longer available for swapping. The file itself is not deleted. Edit the /etc/vfstab file and delete the entry for the swap file. Recover the disk space so that you can use it for something else.
Is it safe to delete Linux swap?
It’s possible to configure Linux to not use the swap file, but it will run much less well. Simply deleting it will probably crash your machine — and the system will then recreate it on reboot anyway. Don’t delete it. A swapfile fills the same function on linux that a pagefile does in Windows.
Must Read
Can I delete swap?
You can not delete a swap file. sudo rm does not delete the file. It “removes” the directory entry. In Unix terminology, it “unlinks” the file.