burnettk / delete-docker-registry-image

If you are running a private v2 docker registry, and you are storing your data on disk, running this script from the machine where the data lives will let you fully delete an image or tag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deleting everything

distributorofpain opened this issue · comments

commented

I went through and deleted all the docker images in my registry but after checking the file structure, there are still a bunch of files in the blob directory that don't seem to be tied to anything. I am wondering if i can just delete those, perhaps they are orphans? The problem is the orphan files take up around 27 GB of space and i need the space back. the files taking up space are all called "data".

Hey Brent,

There are unit tests for various scenarios along these lines. There are some cases where files stick around. A pull request with a failing test and fix is welcome. :)

Otherwise, I'm a bit loathe to advise you to delete data without knowing your precise use case, but if you're just trying to trash all the images in your registry, probably rm -rf everything is your friend.

On Sep 30, 2016, at 11:27 AM, Brent notifications@github.com wrote:

I went through and deleted all the docker images in my registry but after checking the file structure, there are still a bunch of files in the blob directory that dont seem to be tied to anything. I am wondering if i can just delete those, perhaps they are ophans? The problem is the orphan files take up around 27 GB of space and i need the space back. the files taking up space are all called "data".


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

commented

I think i will delete everything using your script, then rm -f on the blob directory to clear out the clutter. The devs can re-upload everything. I may end up rebuilding the VM due to the space limitation anyhow 😞

Thanks for the input, i will consider it going forward should this become a thing with the devs..