Raspberry pi Disk space 100%

I’m using a Raspberry Pi, with Hassbian OS ,there is problem with my Raspberry pi ,Disk space of raspberry pi is 100% complete and cant ability to run any code python , Can anyone help me with the solution

Ssh in. What happens when you type sudo raspi-config and select the option to expand root filesystem?

There is no option for expand root filesystem

Are you sure about that?

https://www.raspberrypi.org/documentation/configuration/raspi-config.md

Advanced Options

Expand Filesystem

If you have installed Raspbian using NOOBS, the filesystem will have been expanded automatically. There may be a rare occasion where this is not the case, e.g. if you have copied a smaller SD card onto a larger one. In this case, you should use this option to expand your installation to fill the whole SD card, giving you more space to use for files. You will need to reboot the Raspberry Pi to make this available. Note that there is no confirmation: selecting the option begins the partition expansion immediately.

Ok, I found it in advanced, and select that option, restart the RPI, and it still 100% usage

raspi-config is for Raspbian, not HassOs, They may have included it in HassOs but the tool targets Raspbian.

I’m well aware. Oddly enough, the OP states he’s using Hassbian…which is based on raspbian.

1 Like

Sorry, my bad :frowning:

There is a bug with it then. That should do it.

Let me find the command that bypasses that.

First of all, what size is the sdcard? Have you tried deleting the DB file in the config directory?

What’s the output of df -h?

sudo resize2fs /dev/mmcblk0p2

So you ran raspi-cinfig selected Advanced and then Expand Filesystem and noticed no difference?
Perhaps your card is full. What size card and what is the otrput of df -hl?

the size of sdcard is 15.8GB
that what I got

pi@hassbian:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   14G     0 100% /
devtmpfs        460M     0  460M   0% /dev
tmpfs           464M     0  464M   0% /dev/shm
tmpfs           464M   12M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1   44M   22M   22M  51% /boot
tmpfs            93M     0   93M   0% /run/user/1000
pi@hassbian:~ $ sudo resize2fs /dev/mmcblk0p2
resize2fs 1.43.4 (31-Jan-2017)
The filesystem is already 3784704 (4k) blocks long.  Nothing to do!

and I if you could give me the site for that DB file

not full, after last update for HA to 0.91.3, first, disk usage was about 30%, that was about week ago,
and every time I start the system, it increases, till about 5 hours ago it was about 96%
now it 100%

Your card is full.
Do you have a bunch of snapshots or logs that could be deleted? Check files in /var/spool/mail in case applications have been trying to send mail to root.

The directory is empty, no files in it

Your filesystem is using 14GB of a 16GB card. Swap & formatting overhead likely account for the remaining part. You either need to figure out where the space is lost or get a bigger card.
Logs are sometimes in files and folders under /var/log

I use the command sudo du -xh / | grep -P "G\t"
,and I got

12G /var/lib/motion
2.9G /

I found that the cam takes pictures all the way, and deleted all the directory content
thanks @flamingm0e and @anon34565116 for helping, I appreciate that

2 Likes

There is also Wolfram with log folder.
Can it be deleted?