2

I ran this command because my Raspberry Pi's SD card is full: sudo find /var -type f -a -printf '%s %p\n'| sort -nr | head -10
The output:

104857600 /var/swap
46641296 /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages
22031232 /var/cache/apt/pkgcache.bin
22010693 /var/cache/apt/srcpkgcache.bin
2808989 /var/cache/debconf/templates.dat-old
2808989 /var/cache/debconf/templates.dat
2334288 /var/lib/aspell/en-common.rws
1803157 /var/lib/dpkg/info/keyboard-configuration.config
1182618 /var/lib/dpkg/info/ri1.9.1.md5sums
1114891 /var/lib/dpkg/info/sonic-pi.md5sums
Yllier123
  • 155
  • 1
  • 8

1 Answers1

3

That's the default size of the swap file, 100 megabytes.

If you want to make it smaller edit /etc/dphys-swapfile and change 100 to some other number.

Use the following commands to put the resize into affect.

/etc/init.d/dphys-swapfile stop
/etc/init.d/dphys-swapfile start

Use the following command to permanently remove the swap file.

sudo update-rc.d dphys-swapfile remove
joan
  • 71,852
  • 5
  • 76
  • 108