How Do I Clear Swap Usage in Linux?
Contents How Do I Clear Swap Space in Linux? to Clear the Swap Memory on Your System, You Simply Need to Cycle off the Swap. This Moves All Data from Swap...
Contents
How do I clear swap space in Linux?
To clear the swap memory on your system, you simply need to cycle off the swap. This moves all data from swap memory back into RAM. It also means that you need to be sure you have the RAM to support this operation. An easy way to do this is to run ‘free -m’ to see what is being used in swap and in RAM.
How do I stop swap usage?
In simple ways or the other step:
- Run swapoff -a: this will immediately disable the swap.
- Remove any swap entry from /etc/fstab.
- Get the system rebooted. Ok, if the swap is gone. …
- Repeat steps 1 and 2 and, after that, use fdisk or parted to delete the (now unused) swap partition.