3

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

1
  • 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
    Feb 6, 2020 at 19:05

3 Answers 3

2

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
2

as an addition to the answer by Chris:

check the lists in

zypper packages --installed-only --suggested

and

zypper packages --installed-only --recommended

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

0

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
1
  • This explained how to forcibly remove a package, which isn’t what the question is asking. Feb 1 at 9:23

You must log in to answer this question.

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