Notes by Peter Galonza(Пётр Галонза)
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Arch

Ignore the package when update /etc/pacman.conf

IgnorePkg=linux

Clean cache

paccache -rk<count of recent versions to keep>
paccache -rk<count of recent versions to keep> --cachedir ~/.cache/pikaur/pkg
paccache -rk<count of recent versions to keep> --cachedir ~/.cache/yay/*/
paccache -rk<count of recent versions to keep> --cachedir /var/cache/private/pikaur/pkg
paccache -ruk0
paccache -ruk0 --cachedir ~/.cache/pikaur/pkg
paccache -ruk0 --cachedir ~/.cache/yay/*/
paccache -ruk0 --cachedir /var/cache/private/pikaur/pkg
rm -rf /var/cache/private/pikaur/build

Recovery

Downgrade package

sudo pacman -U /var/cache/pacman/pkg/*.pkg

Downgrade all packages to a specific date

Edit the mirror list /etc/pacman.d/mirrorlist

Server = https://archive.archlinux.org/repos/2019/12/02/$repo/os/$arch

Downgrade

sudo pacman -Syyuu

AUR

Pikaur

No diff and no edit /root/.config/pikaur.conf

donteditbydefault = yes
nodiff = yes

Create packages for AUR from deb

Create PKGBUILD file

# Maintainer: maintainer_name

pkgname=package_name
pkgver=package_version
pkgrel=package_release
pkgdesc="package_description"

categories=("<category name>")
arch=('i686' 'x86_64')
depends=('package_depends')
license=('package_license')
url="official_site"
source_i686=(url_to_deb)
source_x86_64=(url_to_deb)
sha256sums_i686=('sha256sum')
sha256sums_x86_64=('sha256sum')

install=<file name>.install

package() {
    cd "${pkgdir}"
    tar xf "${srcdir}/data.tar.xz"
}

Create .install

post_install() {
    <path to file>
}

Create .SRCINFO file

makepkg --printsrcinfo > .SRCINFO

Build package

makepkg