This script - pac.sh
- is a simple pacman helper for Arch Linux that provides syntax similar to apt. For example, pac install <package>
instead of pacman -S <package>
. It can be useful to those who, like me, sometimes forget the proper pacman flags to use.
The script implements a subset of apt commands (as well as a few apt-inspired commands) and translates them to corresponding pacman invocations.
This script is not:
- a full-featured pacman wrapper
- a port of apt to Arch
- a replacement for AUR helpers like yay
Clone the repo and copy or symlink the script to a directory that's in the $PATH:
$ git clone https://github.com/IndrekHaav/pac
$ ln -s $(realpath pac/pac.sh) ~/.local/bin/pac
If you happen to have a binary called pac
already installed (check with which pac
), then just use another name for the symlink.
pacman-contrib
(for listing dependencies)curl
(for downloading packages)
Run pac
with no arguments to get an overview of the supported commands:
$ pac
Usage: pac command
Available commands:
search <string> Searches for packages matching <string>
show <package> Returns information about <package>
list --installed Lists all installed packages
--manual Lists all manually installed packages
--upgradable Lists all upgradable packages
--all Lists all available packages
depends <package> Shows a list of dependencies for <package>
rdepends <package> Shows a list of packages that depend on <package>
install <package> Installs <package>
download <package> Downloads <package> to current directory
cache <package> Downloads <package> to pacman cache
remove <package> Removes <package>
autoremove <package> Removes <package> and all its unneeded dependencies
autoremove Removes all unneeded dependencies
clean Removes unneeded cached packages and sync database
upgrade, dist-upgrade Performs a full system upgrade
- add more apt subcommands (download, etc.)
- check that pacman exists / OS is Arch