Arch Linux

pacman

pacman -Rs <package>

... removes a package and its dependencies



pacman -Qdtq | pacman -Rs -

... removes dependencies that are no longer needed



pacman -Qe

... lists all explicitly installed packages



pacman -Qs <package>

... searches for installed packages locally



pacman -Ql <package>

... lists all files belonging to package



pacman -Qlp <package-file>

... lists all files belonging to package-file (f.i pkg.tar.zst file)



pacman -Qo <path to file>

... shows which package /path/to/file belongs to



pacman -Sc

... removes all the cached packages that are not currently installed, and the unused sync databases



pacman -Ss <package name>

... searches for package name in the local repository



pacman -U <package-file>

... updates or installs package from package-file (f.i pkg.tar.zst file)



paccache

paccache -ruk0

... removes all cached versions of uninstalled packages



paccache -rk1

... retains only one past version use of cached packages



Recipes

disk encryption (root partition)

Assuming root partition /dev/mapper/cryptroot mounted at /mnt, boot partition mounted at /mnt/boot and otherwise following the normal installation guide.

Install the basic needed packages into the new encrypted root partition:

pacstrap -K /mnt base base-devel linux linux-firmware intel-ucode networkmanager vim cryptsetup lvm2 grub efibootmgr

Edit the existing line in /etc/mkinitcpio.conf to:

HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)

Create initial ramdisk environment and install GRUB into the EFI boot partition:

mkinitcpio -P
grub-install --target=x86_64-efi --efi-directory=/mnt/boot --bootloader-id=GRUB

Use blkid to find the UUID of the encrypted root partition (f.i. /dev/nvme0n1p3) and edit /etc/default/grub:

GRUB_CMDLINE_LINUX="rd.luks.name=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX=cryptroot root=/dev/mapper/cryptroot"

then create a GRUB config:

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

2026-05-21 14:19:48

minicms - © 2020-2026 Simeon Simeonov