Raspberry Pi – Do not use the Swap to spare our SD card

2
2637





Of course, SD cards have greatly improved in storage size and resistance to successive writings, but the RaspBerry Pi still subjects them to strain. The Swap memory (used by Linux to unload unused RAM) writes and erases very very regularly on the SD card what slowly screw it up. Let’s see how to do without the Swap :

 




We verify that the swap is used:

Free

That sends us the size of the swap.

Sudo apt-get remove dphys-swapfile
Sudo apt-get autoremove

You can now delete the file used by the system to store the Swap:

Sudo rm -f / var / swap
	Reboot

There you go ! Your SD card will thank you!

2 COMMENTS

  1. Hey could you please change the last line of commands. Else people would delete the root filesysstem

Comments are closed.