Contents
How do I delete a SWP file in Linux?
To remove a swap file:
- At a shell prompt as root, execute the following command to disable the swap file (where /swapfile is the swap file): # swapoff -v /swapfile.
- Remove its entry from the /etc/fstab file.
- Remove the actual file: # rm /swapfile.
How do I delete a SWP file in vim?
When you see this, you should choose the “D” option to delete the swap file. If instead you decide to keep the version on disk instead, you can type :q! to quit and then choose the “D” option to delete the swapfile when you next open vim. If you want to see the version on disk, you can type “E” to “Edit Anway”.