zypper-upgraderepo-plugin adds to zypper the ability to check the repository URLs either for the current version or the next release, and upgrade them all at once in order to upgrade the whole system from command line.
This tool started as a personal project when a day I was in the need to upgrade my distro quicker than using a traditional ISO image, Zypper was the right tool but I got a little stuck when I had to handle repositories: some of them were not yet upgraded, others changed slightly in the URL path.
Who knows how to Bash the problem is not exactly a nightmare, and so I did until I needed to make a step further.
The result is zypper-upgraderepo Ruby gem which can be integrated as a zypper plugin just installing the zypper-upgraderepo-plugin package.
Installing zypper-upgraderepo-plugin is as easy as:
- Adding my repo:
sudo zypper ar https://download.opensuse.org/repositories/home:/FabioMux/openSUSE_Leap_42.3/home:FabioMux.repo
- Install the package:
sudo zypper in zypper-upgraderepo-plugin
How to use it
Sometime we want to know the status of current repositories, the command zypper ref does a similar job but it is primarily intended to update the repository’s data and that slow down a bit the whole process.
Instead we can type:
$ zypper upgraderepo --check-current
To know whether or not all the available repositories are upgrade-ready:
$ zypper upgraderepo --check-next
As you can see from the example above all the enabled repositories are ready to upgrade except for the OSS repo which has a slightly different URL.
# The URL used in the openSUSE Leap 42.3
# The suggested one for openSUSE Leap 15.0
Once everything is ok, and after performed a backup including all the repositories, it’s time to upgrade all the repository at once:
$ sudo zypper upgraderepo --upgrade \
That’s all with the basic commands, more information is available in the wiki page of zypper-upgraderepo gem where all the commands are intended with the only use of the gem, but installing the plugin they are also available as zypper subcommands like shown above, also a man page is available as
$ zypper help upgraderepo