September 22, 20232 yr I did an update to a container and got a warning that my Docker image was 72%. I see this in the Memory area on the left on the main page too. I Googled here and there and found a command that lists Image Space Usage: docker system df -v It shows some old containers I don't use any more that are not in the Docker list. It also shows multiple older images for Nextcloud. Probably from upgrading it. For example, here's a bunch of prior versions of Nextcloud that I think are in the image: REPOSITORY TAG IMAGE ID CREATED SIZE SHARED SIZE UNIQUE SIZE CONTAINERS linuxserver/nextcloud 27.1.0-ls271 844b0424c706 5 days ago 881.8MB 25.43MB 856.4MB 1 linuxserver/nextcloud 27.0.2-ls269 2c40df37dcb4 2 weeks ago 828.4MB 0B 828.4MB 0 linuxserver/nextcloud 27.0.2-ls267 88802f11c09b 4 weeks ago 828.4MB 25.43MB 803MB 0 linuxserver/nextcloud 27.0.2-ls266 4994a0316a3d 5 weeks ago 828.4MB 25.43MB 803MB 0 linuxserver/nextcloud 27.0.1-ls261 2832124f79ad 7 weeks ago 825.9MB 0B 825.9MB 0 linuxserver/nextcloud 27.0.1-ls260 0d0af4c9e41a 8 weeks ago 831.1MB 0B 831.1MB 0 linuxserver/nextcloud 27.0.0-ls255 4e1044e331d0 2 months ago 822.7MB 0B 822.7MB 0 linuxserver/nextcloud 27.0.0-ls252 09e7ddf65bd8 2 months ago 822.7MB 25.42MB 797.3MB 0 There's another one in there that is not in my current Docker tab list so I think it's just eating up space. I don't want to do a prune because I think the prune would delete stopped containers, right? Container size: Total size 13.1 GB 1 GB 66.3 MB Docker volume info: Total devices 1 FS bytes used 20.58GiB devid 1 size 30.00GiB used 22.52GiB path /dev/loop2 What's the guidance here? Do I just go in and delete these old containers?
September 22, 20232 yr Author I took a risk and issued a "docker rmi <containerid>" on one of the containers that is not in my Docker list. It deleted it along with a bunch of sha256 entries. But the image shrank! I'm onto something, but need to know if I just should do this with the other containers that are in there that seem to be taking up space. Edited September 22, 20232 yr by nraygun
September 22, 20232 yr Author I think I want to use: docker image prune -a The dox say this: To remove all images which are not used by existing containers, use the -a flag So the stopped containers are using images so these images and containers shouldn't get deleted. But I think it should delete all the extra images that are taking up space that are not in use by a container. Can someone confirm my understanding?
September 22, 20232 yr Solution 3 hours ago, nraygun said: I took a risk and issued a "docker rmi <containerid>" on one of the containers that is not in my Docker list. It deleted it along with a bunch of sha256 entries. But the image shrank! I'm onto something, but need to know if I just should do this with the other containers that are in there that seem to be taking up space. Have you tried advanced view on docker page, It will show orphan images and you can delete from there.
September 22, 20232 yr Author Bingo! This is the way! Thank you very much @SimonF!!! My container is back down to 42% after deleting all of the old orphaned images that were in there. And none of the stopped containers were affected. I guess I'll add this to the list of things to do when I update a container: Update it via a specific tag, check the .conf files, remove old images.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.