Apt++? Nala is Like Apt in Ubuntu but Better

For decades Debian and Ubuntu users used apt-get commands. When its simpler form apt was released, people liked how it showed a progress bar while installing packages.

Irrespective of the progress bar, the packages get installed the same with apt-get and apt commands.

But the progress bar enhances the user experience (UX) and today if I don’t see the green progress bar at the bottom, I feel something is amiss.

Why am I telling you all this? Because I got an apt-get vs apt feeling when I used Nala, a Python-based front end for APT.

Take a look at a screenshot of apt package upgrade in progress with nala.

installing packages using nala
Upgrade in progress with Nala

Like apt enhanced the user experience from apt-get, nala takes it to the next level by making it more human-readable and presenting only the relevant info with beautiful colors.

Actually, Nala does a lot more than just adding colors to the terminal.

Nala: An enhanced, user-friendly tool for managing apt packages

using nala to remove packages
Nala only shows the relevant information that too in a structured way

As you can see, It brought the list of packages that will be affected by the command I executed. And it presented only relevant info with beautiful colors.

This is only one of the core features of Nala. Here are others:

  • Parallel downloads.
  • Checks for the fastest mirrors and uses the fastest 3 by default to speed up downloads.
  • Each command you execute will be stored as Nala history with a unique ID.
  • Compatible with Fish and Zsh.
  • Makes Apt more human-readable than ever.

Sounds interesting? Let’s see how you can install and use it.

Installing Nala in Ubuntu 22.04 and higher

Starting with 22.04, Nala is present in the universe repository of Ubuntu. So, the installation process is going to be one command only:

sudo apt install nala

For older versions, refer to the official wiki for installation instructions.

Using Nala in Ubuntu

Using Nala is fairly simple as it follows almost the same command structure as apt. This means that you just have to interchange apt with nala in every command.

For example, you can update repositories with Nala using this command:

sudo nala update
sudo nala update

Similarly, to install a package:

sudo nala install package_name

And the package can be removed using:

sudo nala remove package_name

That’s elementary. Let’s see about using other interesting features I mentioned earlier.

Fetch the fastest mirrors in Nala

To fetch the fastest mirrors, you’d need to utilize the fetch utility. First, it will determine whether you are using Debian or Ubuntu and then list the fastest mirrors:

sudo nala fetch
sudo nala fetch

And as you can see, I kept the top 4 fastest mirrors by separating them with their index number. Once you select them and press enter, it will show the summary:

saving fastest mirrors for nala

Press Y and it will save changes. Now, update Nala to take effect:

sudo nala update

Use transactional history

This is the interactive way you list and use the history command inspired by the DNF history utility.

You have to pair history with the nala command, and it will bring previously executed commands with relevant info:

nala history
nala history

You can use an ID with nala history and it will get you the details of the specific operation. For example, if I want to have details of what it did while installing curl, I’d have to use ID no 9:

nala history info 9
nala history info 9

But that’s not it. You can alter the effect of a command using history. For example, I installed curl, so I can alter the effect (will remove the software) using the given command:

sudo nala history undo 9
sudo nala history undo 9

And you can redo the command from history using its ID. For example, I installed curl (ID = 9) previously, and if I want to do the same again, I have to use redo :

sudo nala history redo 9
sudo nala history redo 9

Wrapping Up

I understand that the apt command works fine. And I am not suggesting that everyone should replace apt with nala. It’s just good to see projects like these to focus on user experience.

They are clearly inspired by the DNF package manager of Fedora and that’s not a bad thing. The apt developers can also take some hints and add similar features in future.

For now, please share in the comments whether you liked nala or not. And if you liked it, will you use it extensively in place of apt commands?

Similar Posts

  • As a long term Unix admin, I really like NALA especially undo and redo if tinkering. Shame it doesn’t include snaps.

  • Holy crap! What a terrific utility! I have added the following to my .bashrc file:
    alias apt=’nala’
    alias apt-get=’nala’

    to replace apt with nala.

  • It’s really good! I’m using it right now! Nala made it easier for my eyes to read all those seemingly endless lines in the terminal.