On my server I am running Gitlab community edition for my development repositories and today I found a error that was caused by my yum update cronjob.

What happened is that an update from 7.x to 8.x was installed which requires a lot of extra actions to install successfully.

Therefore a zip download of the repository wasn't available (a json file was returned with no files)

The question I wanna ask: Has the yum package an option to only update minor versions (e.g 7.1 to 7.2 but no 7.1 to 8.0)

Thanks in advance

  • Did you get that from a third party repository? Nov 20, 2015 at 23:16
  • This is a repository problem. Normally, you have repo "X for RHEL6" and "X for RHEL7" and it's up to the maintainer to assure that whatever they put there, doesn't require much attention during yum update. Until you migrate from RHEL6 to RHEL7 of course :)
    – kubanczyk
    Nov 20, 2015 at 23:19
  • @Michael gitlab provides since 7.10 yum and apt-get repositories. Nov 20, 2015 at 23:21
  • Not very well, it seems... Nov 20, 2015 at 23:22
  • @Kubanczyk it is not a problem from the os version it is a problem of the package version. For major updates you should expect problems without testing. And I want yum to not install new major versions and only new minor updates. Nov 20, 2015 at 23:25

1 Answer 1


Yum doesn't provide a way to follow a specific semantic version, but there is a way to lock a particular package version in place, using the yum versionlock plugin.

yum install yum-plugin-versionlock

This will allow locking a package to the currently installed version.

For example:

yum versionlock add gitlab*

To update the package, you will have to remove the lock first.

yum versionlock delete gitlab*
  • Can I lock on e.g. 8.* with this plugin? Nov 20, 2015 at 23:32
  • @JeroenDeMeerleer I spent the very first line of this post answering that! Nov 20, 2015 at 23:32
  • I prefer --exclude in my cronjob in that case as this requires less pain when updating the excluded packages 😊 Nov 20, 2015 at 23:39
  • @JeroenDeMeerleer Be very careful with --exclude. It's a blunt instrument and can exclude far more than you think. Nov 20, 2015 at 23:40

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.