Pacui - Bash script providing advanced Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Pacaur/Pamac-cli functionality in a simple UI

PacUI

PacUI provides useful and advanced Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Paru/Pacaur/Pamac-cli commands in a convenient and easy to use text interface.

PacUI is aimed at experienced/intermediate/advanced users of Arch Linux (and Arch-based distributions, including Manjaro), who have at least basic knowledge of their Linux system, Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Paru/Pacaur/Pamac-cli. Absolute beginners are probably overwhelmed by the choices PacUI offers.

This fork of an older version of pacli called PacUI follows the KISS principle: The whole script is contained within one file, which consists of easy to read bash code with many helpful comments. PacUI offers many more features over pacli in order to enhance comfort and speed of CLI based package management.

Table of Contents

Screenshots

UI of PacUI:

Screenshot 01

Installing the package ā€œcantataā€ from system repositories by entering its name:

Screenshot 02

Installation

Dependencies

PacUI has the following hard dependency:

  • sudo

If you want PacUI to fully work, these dependencies are needed as well:

By default, Pacman is used for package management. If you want to enable the use of the AUR, PacUI optionally requires at least one of these AUR helpers:

PacUI supports even more features, if these packages are installed:

  • pacman-mirrors (on Manjaro): PacUI uses ā€œpacman-mirrorsā€ to update your list of repository mirrors and automatically choose the fastest one for you.
  • reflector (on Arch Linux): PacUI uses ā€œreflectorā€ to update your list of repository mirrors and automatically choose the fastest one for you.
  • flatpak: PacUI uses ā€œflatpakā€ to update and clean your installed flatpak packages.
  • snapd: PacUI uses ā€œsnapdā€ to update and clean your installed snapd packages.
  • fwupd: PacUI uses ā€œfwupdā€ to install firmware updates for your system.
  • downgrade: PacUI activates a hidden ā€œDowngrade Packagesā€ option, which lets you use ā€œdowngradeā€ from within PacUI.

Execute without prior Installation

If possible, read chapter Dependencies first and install any dependencies you need.
PacUI file can be downloaded and run without prior installation:

wget https://raw.githubusercontent.com/excalibur1234/pacui/master/pacui
bash pacui

I find this feature of PacUI invaluable for fixing systems. Here are two examples:

  • A large number of updates broke (parts of) the GUI, e.g. xorg, window manager, or desktop environment. In this case, switching to a different tty (with CTRL + ALT + F2), installing PacUI and using ā€œRoll Back Systemā€ to roll back all the latest updates can fix the system (temporarily).

  • A broken keyring makes it impossible to apply updates or install any packages. Executing PacUI without prior installation and using ā€œFix Pacman Errorsā€ (which does not require ā€œexpacā€, ā€œfzfā€, or ā€œpacman-contribā€) to fix the keyring and all related problems is the easiest and fastest solution I know of.

Manual Installation

Please read chapter Dependencies first and decide which packages to install to suit your needs.

PacUI can be manually installed (i.e. executing the same steps as described in the PKBUILD file) as follows:

  1. Download ā€˜pacuiā€™ file:
wget https://raw.githubusercontent.com/excalibur1234/pacui/master/pacui
  1. Make ā€˜pacuiā€™ file executable:
chmod +x pacui
  1. Install ā€˜pacuiā€™ file manually:
sudo cp pacui /usr/bin/

Manjaro

In Manjaro, you can simply install the stable version of PacUI from the Manjaro repositories:

sudo pacman -S pacui

There is also an (often outdated) development version available:

sudo pacman -S pacui-git

Arch Linux

PacUI is no longer available on the AUR.
PKGBUILDs are still availble (see PKGBUILD_AUR file) and Pacui can be executed without installation or manually installed (see above).

chaotic-aur

Both the stable and -git version of PacUI are in chaotic-aur. After adding chaotic-aur to your list of repositories, PacUI can be installed using the same commands as within Manjaro (see above).

Usage

Start PacUI with UI

After successful installation, type the following command into your terminal in order to start PacUI with a simple UI:

pacui

Start PacUI without UI: Using Options

Using PacUI without its UI requires less keystrokes and can therefore be much quicker. An overview of all PacUI options is displayed with pacui h.

For example, you want to display the Reverse dependency Tree of a package. Please note the marked letters ā€œRā€ and ā€œTā€ in PacUIā€™s corresponding UI option.
PacUI does not care, whether you use upper or lower case letters as options or whether you use no, one or two dashes in front. Therefore, the following four commands are equivalent:

  • pacui RT
  • pacui rt
  • pacui -rt
  • pacui --rt

This principle can be used with all of PacUIā€™s options. Here is another random example (of PacUIā€™s hidden ā€œList Packages by Sizeā€ option):

  • pacui LS
  • pacui -LS
  • pacui --LS
  • pacui ls
  • pacui -ls
  • pacui --ls

Start PacUI without UI: Using Options and Package Names

You can also use package names in addition to options. For example, you want to install the package ā€œcantataā€. Then, you can use a command like

pacui i cantata

Instead of a list of all available packages, a much shorter already filtered list is displayed. Simply select the ā€œcantataā€ package you want to install and press ENTER in order to install it.

If an argument contains special characters, it has to be passed on as string. This can be achieved differently depending on the used shell. For example when using regular expressions in zsh in order to search package file names starting with string ā€œarchlinux-ā€:

pacui s '^archlinux-'

Start PacUI without UI: Passing Arguments to AUR helper or Pacman

For advanced use (e.g. in scripting or an alias), PacUI can have a ā€œflagā€ argument, which gets passed directly to an AUR helper and/or Pacman.
Examples:

  • pacui -r 0ad --flag="--noconfirm"
  • pacui u flag --noconfirm
  • pacui --FLAG --asdeps --i --bash
  • pacui b --flag=--noconfirm

Multiple installed AUR helpers

If more than one AUR helper is installed, they are automatically used in the same order as listed above (i.e. Yay is used with priority while Pamac-cli is only used as a last resort). A specific AUR helper can be set with the PACUI_AUR_HELPER environment variable.

Environment variables can typically be set by adding them to your /etc/environment file. If this file exists on your system, it can be selected using PacUIā€™s ā€œEdit Config Filesā€ option:

pacui c

Useful Tips and Recommended Settings

It is highly recommended to use an utility, which notifies the user about available updates alongside of PacUI. Such a lightweight utility is for example update-notifier.

Along with PacUI the following settings are recommended by the author:

Additional Pacman Settings

  • An easy way to edit the /etc/pacman.conf file by using PacUI is:
pacui c
  • A fancy list view for all Pacman updates can be enabled by uncommenting the following line:
#VerbosePkgLists
  • Parallel Pacman downloads can be enabled by uncommenting the following line:
#ParallelDownloads = 3

Alias

If you use PacUI without the UI it is recommended to use an alias for PacUI to reduce the amount of necessary typing. Do this by adding the following line to your ~/.bashrc file (if you use bash):

alias p='pacui'

This will set ā€œpā€ as an alias to ā€œpacuiā€ within your terminal (after a restart of your shell or computer). For example, you can now update your system using

p u

Search syntax

PacUI uses fuzzy finder (fzf) to display lists of items (such as packages, package groups, logs, patchs, etc.) and by starting to type, you can easily search/filter those lists. Regular expressions can be used to improve the search results, e.g.:

Search Term Description
"sbtrkt" Items that match sbtrkt
"^music" Items that start with music
"git$" Items that end with git
"'wild" Items that include wild
"!fire" Items that do not include fire
"!-git$" Items that do not end with -git

A single bar character term acts as an OR operator. For example, the following query matches entries that start with core or end with go, rb, or py.

"^core|go$|rb$|py$"

Help

Short PacUI Help

For short help, e.g. when using PacUI without UI, use one of the following commands:

  • pacui h
  • pacui -h

Detailed PacUI Help

Choose the ā€œHelpā€ option within PacUIā€™s UI by pressing ā€œHā€ or ā€œhā€. pacui --help from the terminal will call PacUIā€™s detailed help page, too.

This help page explains some general stuff such as how to navigate PacUI. It also explains every PacUI option in detail. If you want to look up which commands PacUI uses under the hood and understand them in order to use PacUI correctly, this is the right place for you!

Manjaro Forum Threads

9 Likes

i have just added support for ā€œfwupdā€ to PacUIā€™s ā€œMaintain Systemā€ option.
please test it in the latest version (available on Github) and report any problems.

If you are unsure how to test the latest version, please read chapter ā€œManual Installationā€ in my OP.

I will test it myself for a while and then do a release, when i feel it works well.