Skip to content

FAQ

Frequently asked questions

Here are some frequently asked questions. We recommend that users read this, especially those using CachyOS or Arch-based distributions.

Software management FAQ

Here are all the questions related to the management of software on your system.

How can I update the system?

Terminal window
sudo pacman -Syu

How can I install a package?

Terminal window
sudo pacman -S package

How can I remove a package?

Terminal window
sudo pacman -R package

How can I remove a package and its dependencies that are no longer needed by other packages?

Terminal window
sudo pacman -Rs package

How can I fix the “unable to lock database” error in CachyOS?

Terminal window
sudo rm /var/lib/pacman/db.lck

How can I fix possible keyrings issues in CachyOS?

Terminal window
sudo rm -rf /etc/pacman.d/gnupg/
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman-key --recv-keys F3B607488DB35A47 --keyserver keyserver.ubuntu.com
sudo pacman-key --lsign-key F3B607488DB35A47
sudo rm -R /var/lib/pacman/sync

How can I revert to an older version of a package?

If you install the latest update and find out a specific package doesn’t work or a newer version of the software introduces a bug. You most likely will want to downgrade back to the previous version.

  1. Go into the pacman cache and find the needed package.
    Terminal window
    cd /var/cache/pacman/pkg
  2. Install the needed package.
    Terminal window
    sudo pacman -U package

System maintanance FAQ

Here are all the questions related to the system maintenance or configuration changes of your system.

How can I update GRUB after sudo pacman -Syu

This is indicated by the following text in the terminal and usually comes after a sudo pacman -Syu: grub packages were updated.

:: To use the new features provided in this GRUB update, it is recommended
to install it to the MBR or UEFI. Due to potential configuration
incompatibilities, it is advised to run both, installation and generation
of configuration:
$ grub-install ...
$ grub-mkconfig -o /boot/grub/grub.cfg

If you have an UEFI system

To update GRUB on an UEFI system, simply run the following commands:

  1. sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=cachyos
  2. sudo grub-mkconfig -o /boot/grub/grub.cfg

If you have a BIOS system

To update GRUB on a BIOS system, run the following command:

  1. sudo grub-install --target=i386-pc /dev/sda
  2. sudo grub-mkconfig -o /boot/grub/grub.cfg

How can I remove those annoying warnings while updating my system? Is it safe to update the system when this happens?

“warning: X package: local(1.0.1-1.1) is newer than Y repo (1.0.1-1)“

/_astro/update-warnings.paaercWp.png

Yes, it is safe to update the system.

To remove these errors, just update with ‘-Syuu’:

Terminal window
sudo pacman -Syuu