3

How can I clear up my sd card?

This is how much is used.

Filesystem       Size  Used Avail Use% Mounted on
/dev/root        6.1G  4.3G  1.5G  75% /
devtmpfs         459M     0  459M   0% /dev
tmpfs            463M   30M  433M   7% /dev/shm
tmpfs            463M  6.4M  457M   2% /run
tmpfs            5.0M  4.0K  5.0M   1% /run/lock
tmpfs            463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p6    66M   21M   46M  31% /boot
tmpfs             93M     0   93M   0% /run/user/1000
/dev/mmcblk0p9   2.9G  237M  2.5G   9% /media/pi/0ddbb58e-450f-45b5-af1b-5b8b50096354
/dev/mmcblk0p8   512M  129M  384M  26% /media/pi/91EE-2F21
/dev/mmcblk0p5    30M  3.2M   25M  12% /media/pi/SETTINGS
/dev/mmcblk0p12  4.3G  734M  3.4G  18% /media/pi/root-rbp2
/dev/mmcblk0p11   79M   21M   59M  26% /media/pi/boot-rbp2
/dev/mmcblk0p10  488M  2.3M  456M   1% /media/pi/data
0

1 Answer 1

9

There's a few things you can do.

Clean up old Software

Unused Software

You didn't mention what OS you're running, so I'll go with Raspbian. If you're not using libreoffice, wolfram, or scratch, removing them can save a lot of space.

sudo apt-get purge libreoffice wolfram-engine sonic-pi scratch

Apt-Get

You can often remove a good bit of junk by removing old package dependencies and junk produced by apt-get.

sudo apt-get clean
sudo apt-get autoremove

Rebooting

Your tempfs systems aren't that large, but restarting will remove the contents of those file systems.

As @goldilocks pointed out, it's worth noting that these aren't actually on the sd card, they're held in RAM. I should have maken that distinction, but forgot to.

Other than that...

There's not really much else we can suggest without knowing more about your system and what you've done with it. It'll be up to you to go through your file system and see what in particular is eating up space.

You can use the command du -h | sort -nr | head -n 10 to find your 10 largest directories and go from there.

2
  • It's tmpfs ;) and they're a red herring here. Their contents are not stored anywhere but RAM, so rebooting will not clear any space that way. However, what is worth noting is that /tmp on Raspbian isn't tmpfs and its contents accumulate on the SD card. Your du ... should pick that up if it is oversized.
    – goldilocks
    Jan 31, 2017 at 17:03
  • @goldilocks: I meant to add something in about that, but totally forgot. I added it in as an edit.
    – Jacobm001
    Jan 31, 2017 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.