The standard Advanced Package Tool (apt) has served as the bedrock package management system across Debian, Ubuntu, and Linux Mint for over two decades. However, its default terminal interface has changed very little: installation prompts present dense, unstructured walls of text, downloads execute sequentially over a single mirror connection, and rolling back accidental package upgrades or removals requires digging through raw /var/log/dpkg.log archives. Nala is a modern, drop-in front-end for libapt-pkg written in Python. It transforms package administration with parallel downloads, structured colour-coded summary tables, and an interactive transaction history with one-command rollbacks.
Why Use Nala Instead of Traditional APT?
Nala does not replace the underlying dpkg engine; rather, it interfaces directly with the native APT C++ libraries while overhauling the user experience:
- Parallel Mirror Downloads: Standard APT downloads packages sequentially from a single upstream repository. Nala downloads up to 16 packages simultaneously across multiple fast mirrors, dramatically reducing installation and upgrade times.
- Mirror Benchmarking (
nala fetch): Scans, latency-tests, and benchmarks dozens of worldwide Ubuntu/Debian mirrors, automatically writing the fastest three mirrors to your system sources list. - Structured Visual Summaries: Instead of confusing lines of text, Nala categorises packages slated for installation, upgrading, or removal into distinct, colour-coded Rich terminal tables showing exact version jumps and disk footprints.
- Interactive Transaction History & Undo: Every installation, update, or purge is recorded as an immutable transaction ID. If an update breaks a dependency or removes an essential tool, running
nala history undo [ID]reverses the entire operation cleanly.
| Traditional APT Command | Equivalent Nala Command | Nala Performance Advantage |
|---|---|---|
sudo apt update |
sudo nala update |
Parallel index refreshing with clear progress bars |
sudo apt install <pkg> |
sudo nala install <pkg> |
Parallel multi-package downloads and dependency tables |
sudo apt upgrade |
sudo nala upgrade |
Categorised version comparisons before user confirmation |
| No native equivalent | nala history |
Lists past transactions with date, user, and action counts |
| Manual dpkg recovery | sudo nala history undo <ID> |
Completely reverses any prior package transaction |
Installing Nala on Ubuntu and Debian
On modern distributions (Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, Debian 12 Bookworm, and later), Nala is packaged directly in the official universe and main software repositories:
sudo apt update
sudo apt install -y nala
Verify that Nala is installed correctly by checking its version:
nala --version
Step 1: Benchmarking and Selecting the Fastest Mirrors
Before installing packages, run Nala’s automated mirror optimiser to find the fastest download mirrors in your geographic region:
sudo nala fetch
- Nala pulls a master list of official mirrors for your Ubuntu or Debian release.
- It sends test packets to each mirror, measuring network latency and raw throughput speed.
- After testing, Nala displays a ranked table showing latency in milliseconds and download bandwidth.
- Enter the indices of the top 3 fastest mirrors (e.g.
1 2 3) and press Enter. Nala automatically writes these fast endpoints to/etc/apt/sources.list.d/nala-sources.list.
Step 2: Installing and Upgrading Software
Using Nala follows the familiar syntax of standard APT commands:
sudo nala update
sudo nala install build-essential git curl ripgrep
Notice the structured presentation: Nala groups packages into distinct tables (Installed Packages, Recommended Packages, Dependencies), shows exact disk space increments, and downloads packages concurrently with clean progress indicators.
Step 3: Auditing and Rolling Back Changes with History
If a recent system upgrade introduces a software regression or an experimental library breaks a critical dependency:
- List your previous transaction history:
nala history - Identify the transaction ID that caused the issue (e.g. Transaction
5). - To review exact package changes inside that transaction without executing anything:
nala history info 5 - To completely reverse all modifications made during that session:
sudo nala history undo 5 - Nala recalculates the dependency graph and safely restores the previous versions.
Best Practices and Operational Safety
- Complete APT Interoperability: Because Nala interfaces directly with
libapt-pkg, any software installed via Nala is fully recognized by standardapt,dpkg, and GUI software updaters. You can alternate between tools without corrupting package caches. - Automating Cleanups: Keep your storage clean by running
sudo nala autopurge, which removes obsolete configuration files and orphaned dependencies left behind by uninstalled software.