Search & Filter

May 15, 2026 · View on GitHub

aptui includes a unified search and filter bar that lets you build queries to find exactly the packages you need. You can combine free-text fuzzy search with structured filter criteria in a single input.

Opening the search/filter bar

Press / on the main package screen. A unified input bar will appear at the top of the screen.

Controls

KeyAction
/Open the search/filter bar
oOpen the repository origin filter dropdown
EnterApply the query
EscCancel input / clear the active query

Note: The search/filter bar works together with tabs (All / Installed / Upgradable). Tabs are applied before the query.


How it works

Type any combination of filter tokens and free text in the unified bar:

  • Filter tokens (like section:utils, installed, size>10MB) are parsed as structured criteria
  • Free text (like vim, editor) is used for fuzzy matching against package names and descriptions
  • Both are applied together: filter tokens narrow the results, then free text fuzzy-searches within them

Example: section:editors vim → shows packages in the "editors" section whose name or description fuzzy-matches "vim"

Syntax

A query is composed of tokens separated by spaces. Filter tokens are combined with AND (all must be satisfied). Unrecognized tokens become the fuzzy search query.

Field filters (key:value)

These filters check whether the field value contains the given text (case-insensitive):

FilterShorthandDescription
section:<text>sec:Package section contains <text>
name:<text>Package name contains <text>
version:<text>ver:Package version contains <text>
description:<text>desc:Package description contains <text>
arch:<text>architecture:Package architecture equals <text> exactly
repo:<text>origin:Package repository origin contains <text>

Examples:

section:utils       → packages in a section containing "utils"
sec:editors         → packages in a section containing "editors"
name:vim            → packages whose name contains "vim"
ver:2.0             → packages whose version contains "2.0"
desc:text editor    → packages whose description contains "text" ("editor" becomes a separate token)
arch:amd64          → packages with architecture exactly "amd64"
arch:arm64          → packages with architecture exactly "arm64"
arch:all            → architecture-independent packages
repo:ubuntu         → packages from any origin containing "ubuntu"
repo:noble/main     → packages from the "noble/main" component of any mirror
origin:pop-os       → packages from Pop!_OS repositories

Tip — origins with spaces: Repository origin strings often contain spaces (e.g. archive.ubuntu.com/ubuntu noble/main). Wrap the value in double quotes to treat it as a single token:

repo:"archive.ubuntu.com/ubuntu noble/main"
repo:"apt.pop-os.org/ubuntu noble/main" installed

The easiest way to apply an origin filter is to press o from the package list, which opens a dropdown of all detected origins and automatically injects the correctly-quoted repo: token into the filter bar.

Boolean filters

FilterDescription
installedOnly installed packages
!installedOnly not-installed packages
upgradableOnly upgradable packages
!upgradableOnly non-upgradable packages

Examples:

installed          → show only installed packages
!installed         → show only packages that are not installed
upgradable         → show only packages with available upgrades

Size filters

You can filter packages by installed size using comparison operators:

FilterDescription
size>XSize greater than X
size<XSize less than X
size>=XSize greater than or equal to X
size<=XSize less than or equal to X
size=XSize exactly equal to X

Accepted units:

UnitMeaning
kB or kKilobytes
MB or mMegabytes
GB or gGigabytes
bBytes

If no unit is provided, the value is treated as kB.

Examples:

size>10MB          → packages larger than 10 MB
size<5MB           → packages smaller than 5 MB
size>=100kB        → packages 100 kB or larger
size<=1GB          → packages 1 GB or smaller
size=500kB         → packages exactly 500 kB

Alternative syntax with ::

size:>10MB         → equivalent to size>10MB
size:<5MB          → equivalent to size<5MB

Combining filters

Multiple filters are combined with AND. All criteria must be satisfied simultaneously.

Examples:

section:utils arch:amd64

→ Packages in the "utils" section with "amd64" architecture

installed size>50MB

→ Installed packages larger than 50 MB

!installed desc:editor

→ Editors that are not installed

sec:libs size<1MB arch:amd64

→ Libraries smaller than 1 MB for amd64

installed upgradable size>10MB

→ Installed, upgradable packages larger than 10 MB

name:python sec:python arch:amd64 installed

→ Installed Python packages for amd64

!installed arch:all size<100kB

→ Not-installed, architecture-independent packages smaller than 100 kB


Sorting (order)

You can sort the results by a column using the order: syntax:

order:<column>           → sort ascending (default)
order:<column>:asc       → sort ascending (explicit)
order:<column>:desc      → sort descending

Available columns

ColumnAliasesDescription
nameSort by package name
versionverSort by version string
sizeSort by installed size
sectionsecSort by section
architecturearchSort by architecture

Examples:

order:name               → sort by name A→Z
order:name:desc          → sort by name Z→A
order:size:desc          → largest packages first
order:size:asc           → smallest packages first
order:ver:desc           → newest versions first

Combining sort with filters

Sort can be combined with any other filter:

installed order:size:desc

→ Installed packages, largest first

section:utils order:name

→ Packages in "utils" section, sorted by name A→Z

!installed size>10MB order:size:desc

→ Not-installed packages larger than 10 MB, largest first

Note: When a sort is active, the column header in the package list shows ▲ (ascending) or ▼ (descending).

Unknown data handling

Packages whose metadata hasn't been loaded yet (showing "-" for version or size) are always pushed to the end of the sorted list, regardless of sort direction. This ensures that packages with real data are always visible first.


Combining search and filter

Since the search and filter are now unified in a single bar, you can combine them naturally:

section:editors vim

→ Packages in the "editors" section, fuzzy-matched against "vim"

installed size>10MB python

→ Installed packages larger than 10 MB, fuzzy-matched against "python"


Combining with tabs

Tabs (All / Installed / Upgradable, toggled with Tab) are applied before the query:

  • All tab: the query is applied to all packages
  • Installed tab: the query is applied only to installed packages
  • Upgradable tab: the query is applied only to upgradable packages

Fallback to APT cache

If a fuzzy search returns 0 results from the loaded package list, APTUI automatically falls back to apt-cache search <query> to search the full APT cache. This ensures you can still find packages that may not have been loaded yet.


Repository origin filter

Press o from the package list to open a dropdown listing all repository origins detected from the locally cached APT metadata.

How it works

  1. APTUI scans all loaded packages and collects their unique repository origin strings (e.g. archive.ubuntu.com/ubuntu noble/main, apt.pop-os.org/ubuntu noble/main).
  2. An overlay appears. Navigate with / and press Enter to select.
  3. Selecting an origin automatically writes a repo:"..." token into the filter bar (with quotes when the origin contains spaces) and closes the dropdown.
  4. Press / at any time to open the filter bar — it will already contain the injected repo: token. You can add more tokens or free text alongside it.
  5. Selecting the [Clear repo filter] entry at the top removes the repo: token.
  6. Pressing Esc from the dropdown discards any selection and returns to the package list.

Controls

KeyAction
oOpen the repository origin dropdown
/ kMove selection up
/ jMove selection down
pgup / ctrl+uPage up
pgdn / ctrl+dPage down
enterApply selected origin as repo: filter
escCancel and return to package list

Example workflow

  1. Press o — dropdown appears showing origins such as:
    [Clear repo filter]
    apt.pop-os.org/ubuntu noble/main
    archive.ubuntu.com/ubuntu noble/main
    archive.ubuntu.com/ubuntu noble/universe
    security.ubuntu.com/ubuntu noble-security/main
    
  2. Select archive.ubuntu.com/ubuntu noble/main → the filter bar now shows:
    repo:"archive.ubuntu.com/ubuntu noble/main"
    
  3. Press / to open the bar and add a text search:
    repo:"archive.ubuntu.com/ubuntu noble/main" python
    
    This shows only packages from that repo whose name/description fuzzy-matches "python".

Clearing the query

  • Press Esc on the main screen to clear the active query
  • Press Ctrl+R to reload all packages (also clears the query)