Table of Contents

Downgrading packages

Using older versions of packages can be a security hazard and can also lead to lower system stability. The only fully supported version of a package is the newest one.

Turris OS system is regularly updated and the installed packages gradually change with it. A new version of a package can exceptionally contain an error, because it is impossible to test all packages with all settings. Despite all the efforts to prevent this, it may sometimes happen and in these cases there is the possibility to temporarily revert to a previous version.

Before you decide to downgrade a package, please report the error to our support, or directly to Github.

Available versions of Turris OS can be found in the archive. Depending on which router you wish to carry out the revert, choose either omnia pro Turris Omnia, or turris for Turris 1.x.

The Turris OS repository can be divided into a couple of sub-repositories. They are base, lucics, management, openwisp, packages, printing, routing, telephony and turrispackages. The list of packages is slightly different for every version of the system and which packages are contained in which version of Turris OS can be seen based on which repositories are in packages in the archive.

This manual uses the updater syntax, so we recommend you to first have a look at the documentation for the updater.

Please be aware, that this is only an adjustment of the updater. opkg will continue to work with the newest version of the repository. The packages installed with opkg are therefore always in their most recent version and only after a subsequent start of the updater are the packages downgraded.

Downgrading the entire system

The easiest way to get older versions of packages is to take the entire system back to a previous version of Turris OS. We recommend this method as a temporary solution (for a few days), because it means you are using older versions of security apps and libraries (for example OpenSSL). On the other hand, this method ensures that the apps and libraries are in their tested versions and and there should be no conflict with compatibility between versions and also so issues with stability.

To go back to an older version you need to add the following code into the updater's configuration (i.e. for example file /etc/updater/conf.d/conf.d/archive.lua):

Repository('turris-archive', 'https://repo.turris.cz/archive/TURRIS/VERSION/packages', {
	subdirs = {'base', 'turrispackages', 'lucics', 'packages', 'routing', 'management', 'telephony', 'printing'},
	priority = 60,
	ocsp = false,
	pubkey = "file:///etc/updater/keys/release.pub"
})

TURRIS means either turris or omnia and VERSION is the required version of Turris OS. Next, subdirs has to contain a list of sub-repositories, which the selected version of Turris OS contains. The option priority = 60 ensures that the packages are taken from the archive version (the newest version has priority 50).

After editing the configuration, apply changes by running updater.sh.

Downgrading selected packages

If the issue is in an isolated set of packages, it is often enough to use their older versions and it is not always necessary to return the entire system to an older version. In this case it is necessary to know which packages are the ones causing the problems. This configuration may lead to problems wit package compatibility and hence also stability of the software. The advantage is that this can also be a long term solution, because important parts of the system can be upgraded regardless of the selected packages.

The first step is to add an archive repository. You need to add the following code to the updater's configuration (i.e. for example file /etc/updater/conf.d/archive.lua):

Repository('turris-archive', 'https://repo.turris.cz/archive/TURRIS/VERSION/packages', {
	subdirs = {'base', 'turrispackages', 'lucics', 'packages', 'routing', 'management', 'telephony', 'printing'},
	priority = 40,
	ocsp = false,
	pubkey = "file:///etc/updater/keys/release.pub"
})

TURRIS means either turris or omnia and VERSION is the required version of Turris OS. Next, subdirs has to contain a list of sub-repositories, which the selected version of Turris OS contains. The option priority = 40 ensures that the packages are taken from the newest version (the newest version has priority 50).

Now you can name the packages, which you want to have in the older version, which is done by adding lines to updater's configuration (i.e. for example /etc/updater/conf.d/user.lua) with names of the required packages in the following format:

Install("pkg1", "pkg2", {repository = {'turris-archive'}})

This line tells the updater that you want the packages pkg1 and pkg2 to be installed in the same version as they were in the repository turris-archive.

After editing the configuration, apply changes by running updater.sh.