docker system prune --volumes
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all volumes not used by at least one container
- all dangling images
- all dangling build cache
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
root@DO-Discourse:/#
Not really, that’s pretty telling that the space is being consumed by docker for your container(s). After a cleanup, my numbers are very similar to yours which is perhaps (but not necessarily) indicative of it just being how much it uses.
I did have problems with a 25GB Linode however that was with 500MB+ backups, deleting two or three backups gave me enough room to rebuild. I opted to move to the next tier with 50GB because it was only going to become more constraining and I wanted to rebuild on a monthly cron job.
That was before the switch to Ember CLI though, could that have made things significantly bigger?
That 9GB overlay seems like the issue. But I have one on of a similar size on another instance I just checked. It’s always been challenging at 25GB. I’d recommend that you bite the bullet and get more SSD. The next thing you could try would be to see if there is OS-level stuff that you can remove (logs, unneeded programs, indexes from find, maybe?).
Another idea would be to just spin up a new 25GB VM and move there, hoping that whatever filled up the old one won’t be a problem this time.
None of these answers seems especially satisfying. I fought hard with a 25GB droplet on one or two instances I help manage in the last week or two, but I think you’ve done everything that I did.
Hi Andy, sorry for the delay.
At this point please keep in mind that without insight of your host system, it’s easy to guide you toward a cliff, so backup/snapshot/etc… (or even take a backup, spin up a fresh instance and test the restore process, it has been a good exercice for me)
Assuming you have no use for lxd (lxc list should show installed containers) snap remove lxd (and then core18 and 20)
Thank you for your help. Yes, I know so little about Linux, so I fully appreciate the advice to backup. I have an automatic snapshot and do a manual one whenever I’m messing around like now.
Have no idea what lxd is. I don’t need anything on this droplet that discourse/docker doesn’t need, as it’s solely a discourse droplet.
root@DO-Discourse:/var/discourse# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
local_discourse/app latest 3dac608caa92 4 months ago 3.17GB
root@DO-Discourse:/var/discourse#
root@DO-Discourse:/var/discourse# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9abaf4517b7e local_discourse/app "/sbin/boot" 4 months ago Up 4 months 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app
root@DO-Discourse:/var/discourse#
I think it’s safe to delete all of those images. If you need them they’ll get replaced when you rebuild.
Taking a snapshot isn’t a bad idea.
What I’d do it just spin up a new instance; that’s safest, and probably faster than a snapshot, but if knowing how to do that isn’t fun or instructive, your idea is fine.