Skip to content

Adding CachyOS Repository

Installing CachyOS repositories

Option 1: Automated Installation of CachyOS repositories

We’ve made it easy for you! Simply run the following commands to use our helper script that does all the work for you. 😉

Run the following commands:

  1. Get archive with the script using one of the following utils:

    Terminal window
    curl https://mirror.cachyos.org/cachyos-repo.tar.xz -o cachyos-repo.tar.xz
  2. Extract and enter into the archive:

    Terminal window
    tar xvf cachyos-repo.tar.xz && cd cachyos-repo
  3. Run the script with sudo:

    Terminal window
    sudo ./cachyos-repo.sh

Behavior of the script

  1. The script will auto-detect the CPU architecture, if the CPU has x86-64-v4 or x86-64-v3 support, the script will automatically use the repositories which are optimized with this flag > and some other flags.

  2. The script will backup your old pacman.conf.

Option 2: Manual Installation

  1. Install the cachyos keyring:

    Terminal window
    sudo pacman-key --recv-keys F3B607488DB35A47 --keyserver keyserver.ubuntu.com
    sudo pacman-key --lsign-key F3B607488DB35A47
  2. Install required packages:

    Terminal window
    sudo pacman -U 'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-keyring-20240331-1-any.pkg.tar.zst' \
    'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-mirrorlist-18-1-any.pkg.tar.zst' \
    'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-v3-mirrorlist-18-1-any.pkg.tar.zst' \
    'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-v4-mirrorlist-6-1-any.pkg.tar.zst' \
    'https://mirror.cachyos.org/repo/x86_64/cachyos/pacman-6.1.0-7-x86_64.pkg.tar.zst'

Check CPU compatibility

If you want to add our repositories manually, you must check the compatibility of your CPU with CachyOS repositories.

If you are using the script above to add the CachyOS repositories, you can skip the check.

1. Check support by running the following the command

Terminal window
/lib/ld-linux-x86-64.so.2 --help | grep supported

2. Understanding the command output

Pay attention to the following text with brackets. (supported, searched)

  • If you see x86-64-v4 (supported, searched), that means the CPU is compatible and can use the x86-64-v4 instruction set.
  • If you see x86-64-v4, that means the CPU is incompatible and cannot use the x86-64-v4 instruction set.

Example of CPU compatible with the x86-64-v3 instruction set

> /lib/ld-linux-x86-64.so.2 --help | grep supported
x86-64-v4
x86-64-v3 (supported, searched)
x86-64-v2 (supported, searched)

3. Adding the CachyOS repositories

You need to edit pacman.conf and add the repositories ABOVE THE EXISTING ARCHLINUX REPOS

Terminal window
sudo micro /etc/pacman.conf

If your CPU supports only x86-64, then only add the [cachyos] repository

# cachyos repos
[cachyos]
Include = /etc/pacman.d/cachyos-mirrorlist

If your CPU supports x86-64-v4, then add [cachyos-v4], [cachyos-core-v4], [cachyos-extra-v4] and [cachyos]

# cachyos repos
## Only add this, if your CPU supports the x86-64-v4 architecture
[cachyos-v4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos-core-v4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos-extra-v4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos]
Include = /etc/pacman.d/cachyos-mirrorlist

If your CPU supports x86-64-v3, then add [cachyos-v3],[cachyos-core-v3],[cachyos-extra-v3] and [cachyos]

# cachyos repos
## Only add this, if your CPU supports the x86-64-v3 architecture
[cachyos-v3]
Include = /etc/pacman.d/cachyos-v3-mirrorlist
[cachyos-core-v3]
Include = /etc/pacman.d/cachyos-v3-mirrorlist
[cachyos-extra-v3]
Include = /etc/pacman.d/cachyos-v3-mirrorlist
[cachyos]
Include = /etc/pacman.d/cachyos-mirrorlist
# After that the Arch Linux Repositories should follow
#
#[core]
#Include = /etc/pacman.d/mirrorlist
# ...

Finally, update your system with the CachyOS packages:

Terminal window
sudo pacman -Syu

Enjoy your improved system speed with optimized CachyOS packages! 🎉

Debug packages

We provide a debuginfod server for easy access to debug symbols via gdb. Set the following environment variable:

Terminal window
export DEBUGINFOD_URLS=https://debuginfod.cachyos.org

Debug packages are available in the following repository. Add it with the following configuration:

[cachyos-debug-v3]
Server = https://debug.cachyos.org/repo/$arch_v3/$repo
[cachyos-core-debug-v3]
Server = https://debug.cachyos.org/repo/$arch_v3/$repo
[cachyos-extra-debug-v3]
Server = https://debug.cachyos.org/repo/$arch_v3/$repo
[cachyos-debug-v4]
Server = https://debug.cachyos.org/repo/$arch_v4/$repo
[cachyos-core-debug-v4]
Server = https://debug.cachyos.org/repo/$arch_v4/$repo
[cachyos-extra-debug-v4]
Server = https://debug.cachyos.org/repo/$arch_v4/$repo

Or download them from the above URL manually.

Uninstalling CachyOS repositories

This can be resolved with installing the archlinux pacman first before reinstalling all packages.

Terminal window
sudo pacman -S core/pacman

Option 1: Automated Removal

Run these commands to remove the CachyOS repos from your system:

Terminal window
wget https://build.cachyos.org/cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz
cd cachyos-repo
sudo ./cachyos-repo.sh --remove

Option 2: Manual Removal

  1. Backup or remove the config file at /etc/pacman.conf.

  2. Run this command:

    Terminal window
    sudo mv /etc/pacman.conf.bak /etc/pacman.conf
  3. Switch to default Arch Linux packages with this command:

    Terminal window
    sudo pacman -S core/pacman
    pacman -Qqn | sudo pacman -S -
    sudo pacman -Syu