what to do with a really large swapfile
By Emma Payne •
I have bought a new laptop. It came with Ubuntu installed. I have upgraded to 20.04.01 LTS.
In my root there is a really large swapfile, and that takes up a lot of space. It's 137.6 GB and it's last altered on the 11th of september (more than a month ago).
I don't think i need this file, i have 64 GB of ram. Is there a way to reduce the size?
output of free command
total used free shared buff/cache available
Mem: 65613160 2528548 60546840 98704 2537772 62259952
Swap: 134217724 0 134217724 5 1 Answer
You can remove the swap file totally with this amount of RAM.
Run in a terminal:
sudo swapoff -a
sudo rm /swapfile
sudo nano /etc/fstaband remove the line with the swap file from there.
1