1
0
Fork
You've already forked pac
0
Arch Linux pacman helper
  • Shell 100%
2026年03月30日 12:51:16 +03:00
.forgejo/workflows Update lint workflow, rm Github badge 2026年03月30日 12:51:16 +03:00
LICENSE Initial commit 2022年09月25日 18:34:07 +03:00
pac.sh Update repo URL in script 2026年03月28日 00:50:30 +02:00
README.md Update lint workflow, rm Github badge 2026年03月30日 12:51:16 +03:00

🚧 WIP 🚧

What is this?

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.

What this is not

This script is not:

  • a full-featured pacman wrapper
  • a port of apt to Arch
  • a replacement for AUR helpers like yay

How to install?

Clone the repo and copy or symlink the script to a directory that's in the $PATH:

$ git clone https://codeberg.org/indrek/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.

Optional dependencies

  • pacman-contrib (for listing dependencies)
  • curl (for downloading packages)

How to use?

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

TODO

  • add more apt subcommands (download, etc.)
  • check that pacman exists / OS is Arch