4

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

8

You can reinstall all currently installed packages by this command:

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

Maybe this information will be useful.

  • 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} ') – Avindra Goolcharan Jan 14 '18 at 20:36
1

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.