Can't rebuilt app, says you have less than 5GB space on the disk

סיכום מבוסס בינה מלאכותית

Mohammad is unable to rebuild his Discourse app due to insufficient disk space, as the system reports less than 5GB free on the disk where Docker is located. Despite having a backup of only 500MB, the issue stems from the large space requirements of Docker images and containers, which include the database, Redis, and other services. fhe explains that the actual disk usage is much higher than the backup size and advises checking the system’s disk usage with df -h. They recommend running apt-get autoclean, apt-get autoremove, and ./launcher cleanup to free up space. Mohammad thanks them, calling the solution a life saver.

Hi I am finding it quite difficult to update my discourse through PuTTY. When I run the command

cd /var/discourse
git pull
./launcher rebuild app

I get the following message

You have less than 5GB of free space on the disk where /var/lib/docker is located. You will need more space to continue
Filesystem Size Used Avail Use% Mounted on
/dev/disk/by-label/DOROOT 30G 24G 4.2G 86% /
Would you like to attempt to recover space by cleaning docker images and containers in the system?(y/N)

When I hit Y, it simply keep showing this message and nothing happens:

Total reclaimed space: 0B
If the cleanup was successful, you may try again now

Please help on how to solve it. When I check my discourse backup, its just less than 500MB and I wonder how come I have used up all the space?

Discourse needs much more disk space than the size of the backup, in fact it’s the complete Discourse docker image that runs a database server, redis and much more plus all the uncompressed data.

You can check the real occupied space on your system via
df -h

Although it might be already performed by recovering space during rebuild, you can try this

apt-get autoclean
apt-get autoremove
cd /var/discourse
./launcher cleanup

Thank you that was a life saver!