APT is the default package manager in Debian and Ubuntu-based distributions. And although Debian is one of the oldest Linux-based distributions, the apt package manager is still devoid of many features which other new package managers such as DNF and Pacman have including parallel downloads, history of installed packages, etc.
Nala package manager acts as a frontend for apt, and it just makes the whole installing procedure more streamlined and easy to follow. It fetches all the dependencies of the package, arranges them in a column, and also lists their size as well.
In this tutorial, I will show you how to install, use and utilize all the features of the Nala package manager.
Features of Nala
- Nala utilizes the python-apt API to interact with apt and basically has the same command options as the apt package manager, so you do not have to memorize any new command options.
- You can just type
nala history
to view the history of the last modified packages, this is similar to the feature of dnf package manager on Fedora. - It also supports the rollback of previously installed packages.
- Supports parallel downloads.
- It gives all the information about packages in a clean and streamlined manner.
Installing Nala
Let’s get right into installing Nala so you can try it hands-on and decide if you like it or not.
Method 1: Using their repository
As of now, Nala is not available in any of the official repositories of Debian, Ubuntu, or any of its derivative distributions, so we have to install it by adding their repository to our sources list. Open a Terminal and type the following command:
echo "deb [arch=amd64,arm64,armhf] http://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list
Now, add the GPG key to verify it :
wget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null
Finally, update your repositories and install Nala:
sudo apt update && sudo apt install nala
Method 2: Using Pacstall
Pacstall essentially acts as an unofficial AUR for Debian and Ubuntu-based distributions. It has a huge library of applications that it directly builds from GitHub, and hence it also contains our Nala package manager. But you have to install Pactsall on your system first, so just open a terminal and type the following command :
sudo bash -c "$(curl -fsSL https://git.io/JsADh || wget -q https://git.io/JsADh -O -)"
After the installation is complete, run:
pacstall -I nala-deb
Now that we have Nala installed on our system, let’s look at its usage :
Usage of the Nala command
As I said earlier, its usage is exactly the same as Apt, so let’s try installing the ranger file manager using Nala :
sudo nala install ranger
As you can see, this command’s output looks more presentable. And to update the repositories, you can run :
sudo nala update
You can type nala -h or man nala to read more about the command options it offers.
Set up the fastest mirrors
Type the following command so that you can set up the fastest mirrors and increase your download speed of every package:
sudo nala fetch
Depending upon your latency and speed, Nala will sort 16 mirrors for you and you can select them by typing their ranks one by one and then press Enter.
View and Undo history
To view the history of all the nala run commands, just type :
nala history
Let’s say you want to undo a command which you ran to install a package, you can run :
sudo nala history undo N
Where N is the ID of the command. For example :
Summary
Nala is definitely the way to go for basic package management such as installing, upgrading, and removing packages, but for advanced package management, apt-get is always there for you.
It is also planned that Nala would be written in the Rust language, so let’s see what new features will be added in new versions of this package manager.