Convert Manjaro Linux back to Arch Linux

Posted on May 7, 2021 by Adrian Wyssmann ‐ 6 min read

Manjaro is e very popular distribution based on Arch. I tried it for several months ultimately decided to switch back to pure Arch. But how to do so, without a complete new installation?

Arch vs. Manjaro

Arch is a Rolling Release distribution and has the philosophy to keep it simple. The base system is very minimal and there is no GUI installer

Arch is installed as a minimal base system, configured by the user upon which their own ideal environment is assembled by installing only what is required or desired for their unique purposes. GUI configuration utilities are not officially provided, and most system configuration is performed from the shell by editing simple text files. Arch strives to stay bleeding edge, and typically offers the latest stable versions of most software.

Manjaro is based on Arch but, has a focus on more user-friendliness and accessibility and it’s designed to work fully “straight out of the box”. It comes with a GUI installer and some pre-installed software. Looking at Distrowatch, Manjaro is very popular - 2nd place as of Today.

Why Manjaro and why switching back?

I use Arch since years, cause having a Rolling Release gives you the latest an greatest software without hassle. On my daily work computer I had Arch installed. But yeah, sometimes I break things, and as I completely screw up my notebook, I had to reinstall the OS and I decided to give Manjaro. I am using it for about 2 years now and so far I was ok. But even so it’s based on Arch, not everything available there, is immediately available in Manjaro. Usually this is not a problem but since Gnome 40 was released, I was waiting for it to appear - but it did not yet

You can switch to Gnome 40 Shell right now by changing to unstable branch. We make sure that a seamless update will be possible. When it will land in stable branch we can’t tell. Maybe weeks, maybe months …

I don’t want to wait weeks or months and I also don’t want to run Manjaro Unstable cause after all it’s on my productive notebook. This is where I started to look into switching back to Arch.

Steps to switch back

I found Cover image for Turn your Manjaro into ArchTurn your Manjaro into Arch , an article by Naimul Kabir which it’s a pretty good starting point. I however, extend it with some more information of what I had to do

Pacman configuration

First you have to switch pacman - the package manager back, so that it pulls from the arch repos and not the manjaro ones. First you need to modify /etc/pacman.cfg and remove manjaro specific entries and ensure you use mirror-lists. Mine looks as follows

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
#HoldPkg      = pacman glibc
# If upgrades are available for these packages they will be asked for first
#SyncFirst    = archlinux-keyring
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

#[testing]
#Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

[multilib]
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

After that go to Arch Mirrorlist and generate the mirror list for your country and add it to /etc/pacman.d/mirrolist.

We also remove the pacman-mirrors.conf

sudo mv /etc/pacman-mirrors.conf /etc/pacman-mirrors.conf.bak

Change references from Manjaro to Arch

First we remove the manjaro-release package - -Rs removes packages and it’s dependencies and with -n we make a copy of important configuration files:

sudo pacman -Rns manjaro-release

After that we also have to update os-release-file - which identifies the OS. It can be found in /etc/os-release and shall contain this content:

NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="20;2;20;222;202"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux

As next we update the issue-file - which contains a message or system identification to be printed before the login prompt. It is found at /etc/issue and shall contain this:

Arch Linux \r (\l)

At last we update the lsb-release-file - LSB stands for Linux Standard Base - and the file contains certain LSB and distribution information. We remove the existing and create a new-one

sudo mv /etc/lsb-release /etc/lsb-release.bak
pacman -S lsb-release

This will create a new one which looks like this:

LSB_VERSION=1.4
DISTRIB_ID=Arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"

Update packages, install Arch kernel

First let’s synch the pacman database and update the system:

pacman -Syu

Manjaro manages kernels different than Arch. Kernel packages in Manjaro are something like linuxNNN where NNN represents the version. So Manjaro keeps various stable kernels, whereas Arch has only one stable kernel. Thus install the kernel package

pacman -S linux linux-headers

Remove all Manjaro-specific kernel packages

pacman -Rcn linuxNNN linuxMMM

Once you have the adequate kernels, ensure to update your [grub]. In /etc/default/grub change the GRUB_DISTRIBUTION to Arch. Then update the grub config

sudo grub-mkconfig -o /boot/grub/grub.cfg

You may also remove other Manjaro-specific packages:

pacman -Qsq manjaro-

At last, install missing or additonal packages

pacman -S archlinux-wallpaper archlinux-contrib 
welcome arch linux
After following the steps above, I am back with pure Arch running latest gnome 40