GoogleCloudPlatform / gcr-cleaner

Delete untagged image refs in Google Container Registry or Artifact Registry
Apache License 2.0
805 stars 112 forks source link

Allow deletion of NPM artifacts #87

Closed narner90 closed 2 years ago

narner90 commented 2 years ago

Currently, when specifying a GAR NPM repository, the CLI tool does not detect any repositories. I'm not sure if this is in scope for this project, but it would be nice to be able to clean GAR language repositories (maven, pypi, npm) using this tool.

Arguments:

image: us-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner-cli
command: [ "/bin/gcrcleaner" ]
args:
  - -repo
  - us-central1-docker.pkg.dev/$PROJECT/$NPM_REPOSITORY
  - -dry-run
  - -recursive

Output:

WARNING: Running in dry-run mode - nothing will actually be cleaned!
Deleting refs older than 2022-07-08T19:03:00Z on 0 repo(s)...

Thanks!

sethvargo commented 2 years ago

Hi @narner90

Thank you for opening an issue. This project is specifically designed to delete old container images. I don't think it makes as much sense to delete package versions (like NPM). It would also be out of scope since this is focused on containers.