Manage your packages - Sawangg/dotfiles GitHub Wiki

AUR

Artix is capable of using Arch Linux's AUR. We're going to setup yay to use it. Keep in mind that we're using Artix linux and NOT Arch Linux. It means that some packages that have systemd dependencies will not work on our system.

Yay

Yay is an AUR Helper that will install packages from the Arch AUR. Clone the repository and build it.

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
doas rm -r yay

Doas & Sudo

Because our system doesn't use sudo, we need to create an alias in our ~/.bashrc to run doas instead of sudo for yay

alias yay='yay --sudo doas --sudoflags -- --save'

Now we should be able to use the yay command

Add additional repositories

This is an example for adding the universe repository from Artix Linux.
Go to /etc/pacman.conf and add at the bottom

[universe]
Server = https://universe.artixlinux.org/$arch

Run this to update

doas pacman -Sy

Arch repositories

Artix Linux supports the use of the Arch Linux repositories.

Add this package to enable support

doas pacman -S artix-archlinux-support
doas pacman-key --populate archlinux

Append your /etc/pacman.conf and add whatever Arch Linux repository you want, for example the extra repository.

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

If you want the community repository, all you have to do is change the extra to community.

doas pacman -Sy

You can now install packages from the extra Arch repository.

List installed AUR packages

If you want to list all the packages not installed by the main repositories (AUR or compiled by yourself), you can use this command

doas pacman -Qm

Clean unnecessary packages

You can clean unreferrenced packages using this command

doas pacman -Rsn $(doas pacman -Qdtq)

Clean your pacman cache

doas pacman -Sc

Update repositories

Sometimes, you can get errors when downloading packages. Update the repositories like so

doas pacman  -Syyu

Update your packages

To update every package installed on your machine run

doas pacman -Syu
yay -Syu

Files installed by a package

To list all the files installed by a package, run

doas pacman -Ql package

Get package infos

To list all infos, for example the current installed version, run

doas pacman -Qi package

Downgrade packages

https://wiki.archlinux.org/title/Downgrading_packages