lckdscl's site

paru: The coolest kid on the aur helper block

August 1, 2021


Moving from yay to paru, I discovered a few useful commands that existed in yay that I never bothered checking out. That is pretty much the motivation. It’s built on rust, so obviously it’s blazing fast, lol.


Below is a snippet from my zshrc showing my paru aliases and their tldr:

alias u='paru -Syu' #sync & upgrade
alias usu='paru -Syu --noconfirm' #sync & upgrade w/o confirmation
alias pstats='paru -Ps' #display stats
alias pcmt='paru -Gc' #display comments
alias pnews='paru -Pw' #display news
alias pid='paru -U' #install from local file(s)
alias pir='paru -S' #install from repositories
alias pnd='paru -Qi' #display info from database
alias pnr='paru -Si' #display info from repositories
alias pfd='paru -Qs' #search in database
alias pfr='paru -Ss' #search in repositories
alias pls='paru -Q' #list packages installed
alias plsa='paru -Qea' #list packages explicitly installed
alias orf='paru -Qdt' #list orphaned packages
alias pcc='paru -Scd' #interactive cache removal

FZF integration

I also found that defining an installing and removing function which uses FZF to crawl through the local database is great. Here are the functions

# Paru fuzzy install
function ins {
    paru -Slq | fzf --height=80% --prompt=" " --preview-window=hidden --preview 'paru -Si {1}' \
    | xargs -ro paru -S --removemake --cleanafter

# Paru fuzzy remove
function rem() {
    paru -Qq | fzf -q "$1" --height=80% --prompt=" " --preview-window=hidden --preview 'paru -Qi {1}'\
    | xargs -ro paru -Rns