Is there any alternatives for yum autoremove in rpm or zypper? (openSUSE doesnt have yum)

I need it because zypper installs recommended packages by default and often doesnt clean them automatically

  • As a long-term fix, you could also consider changing your install options so that you only install the depending packages alongside the desired ones instead of the recommended (and maybe the suggested) ones also.
    – Nepumuk
    Commented Feb 6, 2020 at 19:05

3 Answers 3


as an addition to the answer by Chris:

check the lists in

zypper packages --installed-only --suggested


zypper packages --installed-only --recommended

most likely there is some stuff pulled-in by recommended/suggested deps which is "unneeded" for your particular configuration


zypper doesn't seem to have an exact match, but:

To remove a package with its (unneeded) dependencies:

zypper rm --clean-deps <package>

To find packages that are probably not needed anymore:

zypper packages --unneeded

If asking dependencies to uninstall a single package. Then run below command. It will skip dependencies and only target rpm will remove only.

rpm -e packagename --nodeps
  • This explained how to forcibly remove a package, which isn’t what the question is asking. Commented Feb 1, 2023 at 9:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .