# How to clear the swap?



## zodias (May 17, 2012)

Hi,

I see that there are 9284K of memory used on the swap though there are 597M free. Is it possible to clear (empty) the swap manually? I doesn't bother me, but I am just curious.

Thank you!


----------



## pelmen (May 17, 2012)

*I*t will work if you have free memory:

`# swapoff -a && swapon -a`


----------



## zodias (May 17, 2012)

pelmen said:
			
		

> It will work if you have free memory:
> 
> `# swapoff -a && swapon -a`



It works. Thank you once again!


----------

