Manjaro Switching Branches

Switching Branches

From Manjaro

Overview

Warning
Software downloaded and installed from the Testing branch will, by nature, not have been fully tested, and may be unstable.
Warning
Software downloaded and installed from the Unstable branch may break your system! They should therefore only be used by more experienced users and Manjaro testers. Less experienced users may wish to switch to the Testing branch instead.

One of the many features that sets Manjaro apart from other Arch-based distributions is that it uses its own dedicated software branches, rather than relying on those provided by Arch itself. In fact, to ensure continued stability and reliability, Manjaro actually uses three distinct branches:

  • Stable branch: default branch used by Manjaro systems to provide updates and downloads to the general user base.
  • Testing branch: stores patched software packages from the unstable branch, as well other new software releases that are considered at least sufficiently stable. These packages will be subject to further checks by developers and testers for potential bugs and/or stability issues, prior to being released to the stable branch for public use.
  • Unstable branch: stores software packages that have known or suspected stability and/or compatibility issues. This software may therefore be subject to patching by the Manjaro developers prior to being released to the testing branch Although the very latest software will be located here, using the unstable branch may consequently break your system!


Summing up, unstable packages are tested in the unstable branch. Once they are a bit stable, they are moved to the testing branch, where more tests will be realized to ensure the package is ready to be submitted to the stable branch.

Accessing the Testing Branches

In order to access the testing branches, there are two methods available. The first one is a temporary solution, in which if the mirrorlist is recompiled after switching the branch, the selected branch will be reverted to stable. The second one is a permanent solution, where checking for updates using the Update Manager GUI will check for updates from the selected branch.

Temporary Method

Changing the selected branch is fairly simple. We make use of the pacman-mirrors command to update the selected branch. Run the following command in a terminal:

sudo pacman-mirrors -g -b <branch> && sudo pacman -Syyu
  • pacman-mirrors -g will generate a new mirrorlist, sorting the available servers according to their access time.
    • -b <branch> tells pacman-mirrors to use the specified branch. Valid values are: stable, testing, unstable
  • pacman -S will synchronize the local package databases with the remote package databases.
    • -yy will force a refresh on the local package databases, even if they are up to date.
    • -u performs an upgrade to the installed packages.


Note
You must replace <branch> with one of the following options: stable, testing, unstable
Note
Rebuilding the mirrorlist after performing the method described above will revert the selected branch to stable. If you want a permanent solution, check out below.

Permanent Method

To permanently change the selected branch, we must edit the pacman-mirrors configuration file located at /etc/pacman-mirrors.conf. You can edit it with any text editor of your liking:

sudo <text editor> /etc/pacman-mirrors.conf

For example, if we were going to use nano to edit the file, we would run the following command:

sudo nano /etc/pacman-mirrors.conf


Once you have opened the file with a text editor, look for the following lines:

## Branch Pacman should use (stable, testing, unstable)
Branch=stable

You should then change the value colored in green (for illustrative purposes only) to one of the following: stable, testing, unstable.

After you changed the value, just save, exit your text editor, rebuild the mirrorlist and update your packages:

sudo pacman-mirrors -g && sudo pacman -Syyu

Questions

How do I go back to the stable branch after permanently changing to one of the testing branches?

Going back to the stable branch is easy. All you have to do is follow the Permanent Method steps, and use stable as the branch value.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.