How do I tell zypper to reinstall all currently installed packages?


2 Answers 2


You can reinstall all currently installed packages by this command:

zypper in -f $(rpm -q -a --qf '%{NAME} ')

Maybe this information will be useful.

  • 1
    You can add a query to only reinstall certain packages. For example, reinstall all python packages only: zypper in -f $(rpm -qa python* --qf '%{NAME} ') Jan 14, 2018 at 20:36

I would add --no-recommends as option, to not install additional packages.

zypper in --no-recommends -f $(rpm -qa --qf '%{NAME} ') 

also consider --download-in-advance , to avoid missing availability causing the install to interrupt.

zypper in --no-recommends --download-in-advance -f $(rpm -qa --qf '%{NAME} ') 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.