Sharing Knowledge | System Admin Articles

Clear Swap Space in Linux

There have been times where it has been necessary for UNIX Admins to clear out the swap space on a Linux system. In order to do this, you must first make sure that you have enough free memory to hold what is being used by swap.

First we want to see what is currently being used.


Then I run the actual commands that empty the swap:

swapoff -a and then swapon -a

Then I check what is being used after doing this.


Labels: Linux, Quick HOWTO, Swap

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

0 Comments for "Clear Swap Space in Linux"

What do you think about this Article? Add your Opinion..!

Back To Top