APTUI is a terminal user interface (TUI) written in Go for managing APT packages. Browse, search, install, remove and upgrade packages — all without leaving the terminal.
pkg install golang
go install github.com/mexirica/aptui@latest
On Termux, sudo is not available and not needed — APTUI detects the Termux environment automatically and runs all commands without sudo. APT paths are resolved via the $PREFIX environment variable.
Go
go install github.com/mexirica/aptui@latest
Build from source
git clone https://github.com/mexirica/aptui.git
cd aptui
go build -o aptui .
sudo mv aptui /usr/local/bin/
Usage
# Run with sudo to allow package management operations (install, remove, upgrade)
sudo aptui
On Termux, run without sudo:
aptui
Tabs
Tab
Icon
Description
All
◉
All known packages (installed + available)
Installed
●
Only installed packages
Upgradable
↑
Packages with available upgrades
Cleanup
◇
Autoremovable packages
Errors
✕
Error log entries
Transactions
⟳
Transaction history
Repos
◆
PPA / repository management
Navigate tabs with tab / shift+tab, or click on them.
vim # fuzzy search for "vim"
section:editors vim # filter by section + fuzzy search combined
installed size>10MB # installed packages larger than 10 MB
section:utils order:name # packages in "utils" section, sorted A→Z
order:size:desc # all packages sorted by size, largest first
Remove and purge actions show a confirmation dialog:
Key
Action
y
Confirm
n / esc
Cancel
← / → / tab
Switch between Cancel and Confirm buttons
enter
Execute focused button
Import confirmation:
Key
Action
y
Confirm and install
n / esc
Cancel
d
Toggle detail view (paginated package list)
← / →
Navigate detail pages
Phased upgrade confirmation (shown when phased packages are detected):
Key
Action
y
Force upgrade all packages (including phased)
s
Skip phased packages, upgrade only non-phased
n
Cancel upgrade
j / k
Scroll package list in dialog
Data Storage
APTUI stores its data in ~/.local/share/aptui/ (resolves the real user's home even under sudo):
File
Contents
~/.local/share/aptui/history.json
Transaction history
~/.local/share/aptui/pins.json
Pinned packages
~/.local/share/aptui/errors.json
Error log
~/aptui-packages.json
Exported package list
Theme
APTUI auto-detects whether your terminal has a light or dark background using the standard OSC 11 query. Some terminals (e.g. Cosmic Terminal) don't respond to this query, so APTUI may default to dark mode even on a light background.
You can override detection in two ways:
Environment variable — set APTUI_THEME before launching:
# Force light mode (use -E with sudo to preserve the variable)
APTUI_THEME=light sudo -E aptui
# Force dark mode
APTUI_THEME=dark sudo -E aptui
# Or export it in your shell profile
export APTUI_THEME=light
Runtime toggle — press T at any time to switch between light and dark mode. Once toggled, auto-detection is disabled for the rest of the session.
Documentation
Search & Filter — full query syntax, field filters, boolean filters, size comparisons, sorting
PPA Management — adding, removing, enabling and disabling PPAs