Delete files from a file repository

I’m using several generic package repositories for storing binary artifacts as discussed here:
https://docs.gitlab.com/ee/user/packages/generic_packages/index.html

This covers uploading and downloading. But what about deleting?
I’ve tried accessing the file using these documented paths with a DELETE request (with curl) however I get a 404.

I haven’t tried this, but I think you can use the packages API

This looks to me like it would delete an entire package.
But I stumbled upon this issue:

There is no backend wiring to delete a file through the Packages API.
I’m just not sure how this could be… No way to delete files in packages?

I think you must be right. GitLab believes strongly in iteration, so many features are released early and then more functionality is added to them. If you happen to be an early adopter of a feature, you may sometimes have to wait for new features to come in, or implement a workaround. If you upvote an issue that you would like to see implemented, that makes it more likely to be bumped up the priority list.

Ah, I found the definitive answer!

1 Like