Posts: 2
Joined: Fri Oct 23, 2015 10:01 am

Low SD card space

Fri May 31, 2019 9:51 am

On my Raspebbry 2 with SD 16GB is only about 3GB left. I don't install any apps. The basket is empty. Which folder should I look at? Thank you.

User avatar
Posts: 10381
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Low memory

Fri May 31, 2019 9:59 am

sudo fdisk -l
df -h
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV


User avatar
Posts: 839
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: Low memory

Fri May 31, 2019 10:03 am

Did you expand the filesystem?

(Topic name should be changed to something more relevant)
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

Posts: 4595
Joined: Wed Feb 04, 2015 6:38 pm

Re: Low memory

Fri May 31, 2019 10:10 am

The du command (disk usage) is useful (see "man du")

Code: Select all

du -h . | sort -rn | more
prints a list of the sub directories in reverse order of size

Posts: 98
Joined: Thu Mar 07, 2019 1:34 am

Re: Low SD card space

Fri May 31, 2019 10:25 pm

When you empty the trash can, the files can be stored in a folder in a different directory instead of being deleted completely, which is still using space on the memory card, you can find the folder in the /home/pi/.local/share/Trash/expunged directory, if you can't delete the folders or the content with the trash can, you need to delete the files using the rm command:

Code: Select all

cd /home/pi/.local/share/Trash/expunged

Code: Select all

sudo rm -R "folder name"

Posts: 426
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Low SD card space

Sat Jun 01, 2019 12:29 am

Code: Select all

sudo du -h -d1 / 
Will show the usage of each top level directory.

My system includes

Code: Select all

4.8G	/usr
2.2G	/home
1.2G	/opt
You can then drill down into the larger directories to explore further e.g.

Code: Select all

sudo du -h -d1 /opt 
shows Wolfram is using most of the space

Return to “General discussion”