Failed to update to v8.20.1

I’m trying to update DietPi from v8.18.2 to v8.20.1 on a Raspberry Pi 3B+ but I get the following error:

G_CHECK_FREESPACE: Invalid integer from df result

By the error I’m assuming that I don’t have enough free space but the only thing I have installed is PiHole so I should have enough? I really don’t know how to check if I have enough tough.
The microSD card that I have has a 8 Gb capacity.

Can you show the output of df -h please.
You can also check capacity and used space with dietpi-drive_manager.

1 Like

This would be a different error message. Can you check following

G_CHECK_FREESPACE /

@Jappe

@Joulinar


I have the feeling that somehow my DietPi has corrupted system files…

Yes looks like a dying SD card.

Can you try following

apt install --reinstall coreutils
df -h

BTW: no need to do screen prints. You should be able to copy/past everything directly from SSH terminal.

Sorry, Putty wasn’t allowing me to copy/paste. (Apparently there’s a trick to it)
After the first command the df -h works now:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.2G  2.2G  4.7G  33% /
devtmpfs        446M     0  446M   0% /dev
tmpfs           480M  1.5M  479M   1% /dev/shm
tmpfs           192M  2.9M  190M   2% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.0G     0  1.0G   0% /tmp
tmpfs            50M   36K   50M   1% /var/log
/dev/mmcblk0p1  127M   32M   95M  26% /boot

Running dietpi-update now works without that error, but I think it’s a better idea to just get a new SD card and fresh install DietPi there. Who knows what more is corrupted and when will it happen again.
I already made backups of the settings that I changed so nothing is lost, only time to re-configure everything again xD

Thanks for the help.

Normally Putty supports copy/paste text ootb. Simply select the text in the Putty window and it is automatically copied to the clipboard. No additional keys need to be pressed.

1 Like