How to Delete a Repository in Vultr Container Registry

Updated on November 27, 2024

Deleting a Repository in the Vultr Container Registry frees up storage space and removes outdated or unnecessary images. This process helps streamline management and ensures that your registry contains only relevant and up-to-date resources. By keeping your repositories organized, you can maintain an efficient and clutter-free container registry.

Follow this guide to delete a repository from your container registry on your Vultr account using the Vultr Customer Portal, API, or CLI.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  1. Navigate to Products and click Container Registry.

    Container Registry in the products menu

  2. Click your target registry to open its management page.

    Selection of a target container registry

  3. Click Repositories to view all the available repositories.

    Button to open the repositories page and view all the repositories

  4. Click the delete icon to delete the repository.

    Button to open the delete repository dialog box

  5. Click the Destroy Repository in the confirmation prompt to delete the repository.

    Button to confirm the deletion of the repository

  1. Send a GET request to the List Registries endpoint and note the target registry's ID.

    console
    $ curl "https://api.vultr.com/v2/registries" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a GET request to the List Registry Repositories endpoint to list all the available repositories and note the target repository image's name.

    console
    $ curl "https://api.vultr.com/v2/registry/<registry-id>/repositories" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  3. Send a DELETE request to the Delete Repository endpoint to delete the target repository.

    console
    $ curl "https://api.vultr.com/v2/registry/<registry-id>/repository/<repository-name>" \
        -X DELETE \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  1. List all registries available in your Vultr account and note the target registry's ID.

    console
    $ vultr-cli container-registry list
    
  2. List all the repositories available in your target registry and note the target repository image's name.

    console
    $ vultr-cli container-registry repository list <registry-id>
    
  3. Delete the target repository.

    console
    $ vultr-cli container-registry repository delete <registry-id> --image-name <repository-image-name>