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:
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
There you go ! Your SD card will thank you!