Using zypper, how can I remove all packages installed from a specific repository

opensuserpmzypper

Say I've added a repository using zypper ar. Then, I've gone and installed multiple packages from that repository, but now I want to remove all of them.

Is there a command that allows me to remove all the packages that I've installed just from that specific repository?

Best Answer

I think there is no such command. You can list packages from specific repository:

zypper search --installed-only --repo devel:tools

or all orphaned packages if you've already removed that repository:

zypper packages --orphaned

Then you could try to cut package names from the output and pass it to zypper remove if it's worth the effort.

Related Question