Story #1896

pulp_admin rpm repo remove should have an --all flag

Added by bmbouter over 5 years ago. Updated over 2 years ago.

Start date:
Due date:
% Done:


Estimated time:
Platform Release:
Sprint Candidate:
Pulp 2


If you want to remove all units of a specific type from a specific repo (for instance langpacks) you might try to do:

pulp-admin rpm repo remove langpacks --repo-id repo_8

The above command should cause a request to the server, but it instead fails due to a validation problem. To get around that validation issue, you have to add one of the filtering parameters. For example the --str-eq parameter. If you add that then this will work:

pulp-admin rpm repo remove langpacks --repo-id repo_8 --str-eq="repo_id=repo_8"

Instead of having to form a --str-eq field, it would be great if the --all could be used like this:

pulp-admin rpm repo remove langpacks --repo-id repo_8 --all


#1 Updated by mhrivnak over 5 years ago

FWIW I'm pretty sure this was a deliberate choice, so users don't accidentally remove everything from a repo if they didn't mean to. I'm not arguing that's the right choice necessarily, but it's worth knowing that it was deliberate before changing it via a simple bug process.

I think the logic was something like this: "ls" lists all the files in a directory. "find" will display everything within a path if given no arguments except a path. But "rm" always requires an argument that explicitly defines what to remove.

Perhaps a reasonable improvement would be to add a "--all" option with a "-a" alias. That would make the cited use case very easy at least.

In any case, even if you want to make the command remove everything by default with no other args, I think it would be worth converting this to a story that talks about changing an existing behavior.

#2 Updated by bmbouter over 5 years ago

  • Tracker changed from Issue to Story
  • Subject changed from pulp_admin rpm repo remove should not require more than --repo-id to pulp_admin rpm repo remove should have an --all flag
  • Description updated (diff)
  • Groomed set to No
  • Sprint Candidate set to No

mhrivnak: that is a good point, I understand now. I've rewritten the description as a story for the --all flag.

#3 Updated by bmbouter over 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#4 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF