I moved to openSUSE recently. In their cheat sheet, there is a section called "Lock packages". Can someone explain for me what they are and when they're used?

for example: lock all packages starting with 'yast2'

zypper addlock yast2*


zypper al yast2*

Maybe an example is the easiest way to explain: we use cloud-init to deploy new instances within a private cloud. And for our environment we have to rely on a configuration which has been broken a couple of times during the development of cloud-init. So when we find a working cloud-init version we lock it. That way no update will break that version.

So in conclusion: whenever you need to keep a specific version of a package you would lock it for zypper.

| improve this answer | |

Sometimes you face some bugs or issues when updating certain packages. At the same time you want patch or upgrade the rest packages.

So, How to ignore updating certain packages?

By locking them.

| improve this answer | |

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.