README.md

May 15, 2026 · View on GitHub

Logo

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.

Built with Bubble Tea, Lip Gloss and Bubbles.

Features

  • Browse all packages — lists every available APT package with version and size info loaded lazily
  • Search & filter — single bar for fuzzy search and structured filters (section, architecture, size, status, repository origin and more) (docs)
  • Repository origin filter — press o to open a dropdown listing all package origins; selecting one injects a repo: token into the filter bar, which you can further combine with text search
  • Column sorting — sort packages by name, version, size, section or architecture; click headers to cycle ascending → descending → clear
  • Tabs — switch between All, Installed, Upgradable, Cleanup, Errors, Transactions and Repos views; tabs with pending items highlight in yellow
  • Multi-select — mark multiple packages with space, then bulk install/remove/upgrade
  • Mouse support — click to select packages, click again to toggle selection, click column headers to sort, scroll wheel to navigate
  • Parallel downloads — installs and upgrades use parallel downloads by default for faster operations
  • Transaction history — every operation is recorded; undo (z) or redo (x) past transactions (docs)
  • Fetch mirrors — detect your distro, test mirror latency, and apply the fastest sources (docs)
  • PPA management — list, add, remove, enable and disable PPA repositories (docs)
  • Cleanup — dedicated tab listing autoremovable packages; clean them all with c
  • Error log — all errors are captured and shown in a dedicated tab with source, timestamp and full message detail
  • Light / Dark theme — auto-detects terminal background; override with APTUI_THEME=light|dark or toggle at runtime with T
  • Pin favorites — pin packages with F to keep them at the top of the list (★); pins are persisted across sessions
  • Export / Import — export all (E) or only manually installed (M) packages to JSON; import from file (I) to restore your environment (docs)
  • Version selection & downgrade — press v to see all available versions of a package and install any of them, including older versions (docs)
  • Phased update detection — when upgrading, APTUI detects packages held back by APT's phased-updates mechanism and lets you force, skip, or cancel
  • Hold packages — hold (H) packages to prevent them from being upgraded
  • File list — view installed files for any package (l); uses apt-file for non-installed packages
  • Inline detail panel — shows package metadata (version, size, dependencies, homepage, status, etc.); scroll with J/K when content overflows
  • Side-by-side & stacked layouts — toggle between layouts with L; auto-selects based on terminal width (≥ 120 for side-by-side)
  • Responsive dialogs — confirmation overlays adapt to small terminal sizes, wrapping text and adjusting padding automatically
  • Essential package protection — essential packages cannot be removed or purged
  • Termux support — runs natively on Android via Termux without sudo; APT paths are resolved through $PREFIX
  • Background updates — silent apt-get update runs in the background after initial load

Installation

APT (Debian/Ubuntu)

curl -fsSL https://mexirica.github.io/aptui/public-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/aptui-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/aptui-archive-keyring.gpg] https://mexirica.github.io/aptui/ stable main" | sudo tee /etc/apt/sources.list.d/aptui.list
sudo apt update && sudo apt install aptui

Termux (Android)

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

TabIconDescription
AllAll known packages (installed + available)
InstalledOnly installed packages
UpgradablePackages with available upgrades
CleanupAutoremovable packages
ErrorsError log entries
TransactionsTransaction history
ReposPPA / repository management

Navigate tabs with tab / shift+tab, or click on them.

Package Indicators

SymbolMeaning
(green)Installed
(gray)Not installed
(yellow)Upgradable
(red)Security update available
(orange)Held
Pinned
Essential
Manually installed
[x] / [ ]Selected / unselected

Keybindings

KeyAction
/ kMove up
/ jMove down
JScroll detail panel down
KScroll detail panel up
pgup / ctrl+uPage up
pgdown / ctrl+dPage down
tabNext tab
shift+tabPrevious tab

Search & Filter

KeyAction
/Open search/filter bar
oOpen repository origin filter dropdown
enterConfirm search / apply filter
escClear search / filter / go back

Examples

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
repo:ubuntu noble/main                 # packages from a specific repository origin
"repo:apt.pop-os.org/ubuntu noble/main" installed  # combine repo filter with other tokens

See the full search & filter documentation for all available options.

Selection

KeyAction
spaceToggle select current package
aSelect / deselect all filtered packages
clickSelect a package (click again to toggle check)

Sorting

Key / MouseAction
Click column headerSort by that column (click again to reverse, third click to clear)
/ + order:nameSort by name via query
/ + order:size:descSort by size descending via query

Actions

KeyAction
iInstall package (or all selected)
rRemove package (or all selected) — shows confirmation dialog
uUpgrade package (or all selected)
GUpgrade all packages (apt-get dist-upgrade)
pPurge package (or all selected) — shows confirmation dialog
HHold / unhold package (or all selected)
cClean up all autoremovable packages
FPin / unpin package (or all selected)
EExport all installed packages to JSON file
MExport only manually installed packages to JSON file
IImport packages from JSON file
vOpen version selector for current package (docs)
oOpen repository origin filter dropdown
URun apt-get update
ctrl+rRefresh package list

History & Mirrors

KeyAction
tOpen transaction history
zUndo selected transaction
xRedo selected transaction
fFetch and test mirrors

See: Transaction History · Mirror Fetch · Version Selection

PPA Management

KeyAction
POpen PPA list
aAdd a new PPA
rRemove selected PPA
eEnable / disable selected PPA
escBack to package list

See: PPA Management

File List

KeyAction
lShow / hide file list for selected package
Shift+↓ / JScroll file list down
Shift+↑ / KScroll file list up
Shift+PgDnPage down in file list
Shift+PgUpPage up in file list

General

KeyAction
LToggle side-by-side / stacked layout
TToggle light / dark theme
RToggle install recommends (default: ON)
SToggle install suggests (default: OFF)
DClear error log (on Errors tab)
hToggle full help
q / ctrl+cQuit

Confirmation Dialogs

Remove and purge actions show a confirmation dialog:

KeyAction
yConfirm
n / escCancel
/ / tabSwitch between Cancel and Confirm buttons
enterExecute focused button

Import confirmation:

KeyAction
yConfirm and install
n / escCancel
dToggle detail view (paginated package list)
/ Navigate detail pages

Phased upgrade confirmation (shown when phased packages are detected):

KeyAction
yForce upgrade all packages (including phased)
sSkip phased packages, upgrade only non-phased
nCancel upgrade
j / kScroll package list in dialog

Data Storage

APTUI stores its data in ~/.local/share/aptui/ (resolves the real user's home even under sudo):

FileContents
~/.local/share/aptui/history.jsonTransaction history
~/.local/share/aptui/pins.jsonPinned packages
~/.local/share/aptui/errors.jsonError log
~/aptui-packages.jsonExported 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


Star History Chart