How to 'prune' unused docker images in Electric Eel?

Coming from the dockge-in-jailmaker setup, I got used to purging / pruning unused docker images to free up space & to ensure a ‘clean’ build for any given container or stack.

The TrueNAS shell command for this is:

jlmkr shell docker

Then, once in the docker shell:

docker system prune -a

Is there a similar way to do this in EE? I see the container mgmt interface under Apps > Configuration > Manage Container Images, but it doesn’t quite look as easy / automated as the docker prune command was at “cleaning” unused stuff.

This should work in EE

1 Like

it works in RC2,recovered 8.47GB.

1 Like

Yes it does (straight from the shell), thanks.

1.693GB here.

Its not really made easy by TrueNas Scale to get this cleaned up via GUI.

I am - as a beginner - hesitant to run the command in case i break something.

So from the docs: docker system prune | Docker Docs

Will it cleaned unused image and leave my current App Images alone, or will it remove ALL not started containers as well?

So will i have to start all Apps to be safe, and then run the command?

Cheers

still works, recovered 149.2GB lol

1 Like

You can also go to Apps Configuration > Manage Container Images rather than running docker prune in shell. Just select all images, click batch Delete, Confirm and delete. As long as you don’t click Force, Docker will automatically clear only the inactive images.

1 Like

this indicates that all installed apps need to be running … i wonder if there is a “safe” command to run which autom. detects the latests used image and delete all the other/unused

That’s just how image pruning works in docker. It’s generally safe though because it will just pull the required images again when you start the stopped containers. It doesn’t remove your configuration or data.

1 Like

thats great info!

Huh, that is not obvious to the uninitiated…

Edit:
In fact, the wording directly suggests otherwise:

Only after clicking Confirm without Force does it become clear it didn’t/couldn’t remove all 8:

Had you not said what you just did, I would not have risked it, even if the containers can be redownloaded easily.

Agreed, the presentation could be clearer there. I think it is an issue of the UI not currently having a concept of which images are in use during that first confirmation step.

This ONLY deletes the Images listed!
If you only show 20 per pages it only tries to delete the 20 first…
So don’t forget to show 100 and do the same on page 2.

2 Likes