SKOPEO-DELETE(1)

πŸ’– SKOPEO-DELETE πŸ’–

okay so bestie, we're talking about skopeo-delete(1) β€” the little subcommand that ✨marks your image for the registry's garbage collector✨. it's giving "i'm putting you in the trash pile, whether the trash truck shows up is not my problem." let's get into it πŸ—‘οΈπŸ¦‹


🌸 SYNOPSIS 🌸

skopeo delete [options] image-name

✨ DESCRIPTION ✨

so what it does is mark image-name for later deletion. that's it. that's the whole vibe. the actual effect is registry-specific, and ngl β€” a lot of registries just don't support this operation, or they won't let you do it in certain circumstances / configurations. so don't come crying to me when it doesn't work, i warned you πŸ’…

WARNING: if image-name contains a digest, this affects the referenced manifest, and it may delete all tags (within the current repository?) pointing to that manifest. yeah. all of them. not just one. 😭
WARNING: if image-name contains a tag (but no digest), in the current version of Skopeo this resolves the tag into a digest, and then deletes the manifest by digest, exactly as described above β€” which means it might delete all tags pointing to that manifest, not just the provided tag. this behavior may change in the future. so like… be aware. lowkey terrifying but okay 🫢

πŸŽ€ the github.com/distribution/distribution registry tea β˜•

if you're running that registry server: to actually release the allocated disk space, you must log in to the container registry server and run the container registry garbage collector. like, for real for real. e.g.:

/usr/bin/registry garbage-collect /etc/docker-distribution/registry/config.yml

Note: sometimes the config.yml is stored in /etc/docker/registry/config.yml β€” sneaky little path swap, iykyk πŸ™ˆ

and if you're running the container registry inside a container, you'd run something like:

$ docker exec -it registry /usr/bin/registry garbage-collect /etc/docker-distribution/registry/config.yml

πŸ’… OPTIONS πŸ’…

also, heads up: see skopeo(1) for options that go before the subcommand name πŸ‘‘

  • --authfile path β€” path of the primary registry credentials file. on Linux, the default is ${XDG_RUNTIME_DIR}/containers/auth.json. see containers-auth.json(5) for more deets about the credential search mechanism and the defaults on other platforms. use skopeo login to manage the credentials. the default value of this option is read from the REGISTRY_AUTH_FILE environment variable. πŸŽ€
  • --creds username[:password] β€” credentials for accessing the registry.
  • --cert-dir path β€” use certificates at path (*.crt, *.cert, *.key) to connect to the registry. πŸ”
  • --daemon-host host β€” use docker daemon host at host (docker-daemon: transport only).
  • --help, -h β€” print usage statement. classic. the GOAT. ✨
  • --no-creds β€” access the registry anonymously. additionally, the registry must allow deletions by setting REGISTRY_STORAGE_DELETE_ENABLED=true for the registry daemon. πŸ‘€
  • --registry-token token β€” bearer token for accessing the registry.
  • --retry-times β€” the number of times to retry. by default, no retries are attempted. 🎯
  • --retry-delay β€” fixed delay between retries. if not set (or set to 0s), retry wait time will be exponentially increased based on the number of failed attempts. πŸ“ˆ
  • --shared-blob-dir directory β€” directory to use to share blobs across OCI repositories.
  • --tls-verify=bool β€” require HTTPS and verify certificates when talking to the container registry or daemon. defaults to the registry.conf setting. πŸ”’
  • --username β€” the username to access the registry.
  • --password β€” the password to access the registry.

🌈 EXAMPLES 🌈

mark image example/pause for deletion from the registry.example.com registry:

$ skopeo delete docker://registry.example.com/example/pause:latest

see above for additional details on using the command delete. yes, "see above." we love a self-referential moment πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

skopeo(1), skopeo-login(1), docker-login(1), containers-auth.json(5)


🫢 AUTHORS 🫢

absolute icons, the whole lineup:

  • Antonio Murdaca runcom@redhat.com ⟨mailto:runcom@redhat.com⟩
  • Miloslav Trmac mitr@redhat.com ⟨mailto:mitr@redhat.com⟩
  • Jhon Honce jhonce@redhat.com ⟨mailto:jhonce@redhat.com⟩

and that's the whole page bestie!! this was skopeo-delete(1)() β€” you found it in the skopeo-delete(1) section of your manual, and now you're a certified expert. go forth and mark things for deletion responsibly, mwah πŸ’‹πŸŒΈβœ¨

πŸ“¦ where this page comes from