I was trying to delete the swapfile on a digital ocean virtual server using the instructions given here:
However, when I type:
sudo rm /swapfile
I get the following error:
rm: cannot remove `swapfile': Operation not permitted
I have changed the permissions on the swap file to 777 and I believe I have root privileges. I still cannot delete it. It may be helpful to know that I created this instance of a server from an image of another server that I had configures. The swap was enabled in that original server.
How do I delete this file?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!