delete rpm content via api or command line
I use specific custom repositories that aren't synced to publish packages from third party software vendors.
Because of this, I wanted to ask how I can delete existing RPM packages (content). When I try to remove the Artifact, I get the following error: "The Artifact cannot be deleted because it is associated with Content." However, I cannot remove the package: "Method "DELETE" not allowed."
I unfortunately didn't find anything in the documentation about this.
Thanks in advance for the answer.
Translated with www.DeepL.com/Translator (free version)
There are a couple of Pulp-architectural issues involved here. First, repository-versions are immutable (so you can get back to any version and have all the content available). This means that you can't remove content as long as there still exists a repo-version that "knows about it".
Second, Pulp deduplicates content. Artifacts can be shared across repositories - which means the repo you're looking at, may not be the only one hose repo-versions still point to the content.
So - the way content gets removed "from Pulp", is via the orphan cleanup task. This task runs periodically, looking for Artifacts that don't "belong to" any repository-versions, and haven't been touched in a while, and removes them.
To remove content - you'd use the RPM RepositoryVersion DELETE API or the CLI command
pulp rpm repository version destroy followed by
pulp orphan cleanup.
We def need docs on this full workflow, we'll keep this report open to indicate that there's docs-work to do here.
Please register to edit this issue