Brief: This article will walk us through the installation and usage of Nala as an alternate package manager to the commonly used APT package manager for Debian-based Linux distributions like Ubuntu and Linux Mint.
The primary aim of the Nala package manager is to help Debian-based Linux users understand what goes on in the background when installing, removing, and/or upgrading various system packages.
The libapt-pkg frontend is interfaced by python-apt api hence the need to have Python 3 installed on a Debian-based system prior to the installation of Nala.
The use of Nala as a package manager excludes redundant messages, provides better package formats, and uses color to highlight specific system events behind package installation, removal, and upgrade.
Prominent Features of Nala Package Manager
The following are the unique package manager features are associated with Nala.
Parallel Downloads
Apart from the pretty text formats presented by the Nala package manager, it is highly praised for supporting parallel downloads. For each unique mirror in the sources.list (/etc/apt/sources.list) file, you can initiate the download 3 packages.
These multiple connections to a single mirror approach speed up the download of numerous small packages. Also, with parallel downloads, users have the flexibility of switching between alternate mirrors for better download speed.
Fetch
The following command will confirm your Linux distribution (Ubuntu or Debian), fetch associated mirrors from the relevant master list, test & score the mirrors’ latency, and finally select the fastest 3 configurable mirrors to be written to the file.
$ nala fetch
History
The following command accounts for all the package manager transactions carried out on your Debian-based system. The file /var/lib/nala/history.json stores all information related to packages’ installation, removal, and upgrade under a unique <ID>
.
$ nala history
The above command can be further manipulated by commands like:
$ nala history redo <ID> or $ nala history undo <ID>
To partially or fully clear the history file, run:
$ nala history clear <ID> or $ nala history clear --all
Installing Nala Package Manager in Debian-based Systems
First, make sure you have Python3 installed, if not you can install it using the following command:
$ python3 -V $ sudo apt install python3
Once python is installed, you can install and confirm the Nala using the following commands.
$ sudo apt install nala $ nala --version
How to Use Nala Package Manager in Debian-based Systems
To use Nala, simply replace all APT instances in your command with Nala as shown.
$ sudo nala update
To search for a package:
$ nala search [package-name]
To install a package:
$ sudo nala install [package-name]
You will be presented with an interactive interface like the following:
To get the information about the package:
$ nala show [package-name]
To remove a package:
$ sudo nala remove [package-name]
To fetch the Debian or Ubuntu mirror list, run:
$ sudo nala fetch
Choose mirrors you want to keep and confirm your choice:
To get the summary of the apt transaction, run:
$ nala history
Nala educates Debian-based users on what goes on behind each command handled by the OS package manager. Its format is user-friendly enough and interactively exciting to use.
This is a great alternative to APT.
I note that you show the command
"$ nala history clear --all"
to clear the history. In my OS Linux Mint 20, I must sudo, for example “sudo nala clear history --all
“.Hopefully helps either one of us. Thanks, Ken