Nala is a recently-introduced package manager which also uses dpkg for managing packages in Ubuntu. I installed nala and I'm getting a very decent experience.

Now, I wanted to remove apt from my system, so that only one package manager (nala) remains on it.

I tried:

nala remove apt --remove-essentials

but after this command ran successfully, I lost both apt and nala.

On nala update I am getting:

bash: /usr/bin/nala: No such file or directory
  • 7
    "Nala is a front-end for libapt-pkg. Specifically we interface using the python-apt api. Especially for newer users it can be hard to understand what apt is trying to do when installing or upgrading. We aim to solve this by not showing some redundant messages, formatting the packages better, and using color to show specifically what will happen with a package during install, removal, or an upgrade." I find very ironic that you like nala which is a tool that tries to solve a human problem with technology and your question proves that, as expected, it fails badly: users don't read.
    – GACy20
    Feb 3, 2023 at 14:07

1 Answer 1


You made a rather big mistake, in taking for granted that nala doesn't need apt - it does.

This is completely evident by running apt depends nala, showing nala's dependencies.

  Depends: python3-anyio
  Depends: python3-httpx
  Depends: python3-pexpect
  Depends: python3-rich
  Depends: python3-tomli
  Depends: python3-typer
  Depends: python3-typing-extensions
  Depends: <python3:any>
  Depends: apt
  Depends: python3-apt
  Depends: python3-debian
  Recommends: python3-socksio

So nala will not function without apt.

If you had carefully read the output of the command nala remove apt --remove-essentials, you would most likely see that it was about to remove the nala package itself. Hence, it's important to review what the command is about to do, especially when you run the command with the --remove-essentials option (an option that can potentially break the system).

It's generally a good idea to do a --dry-run before removing critical packages, or running with --remove-essentials - and ironically, this is an option that only apt supports, but nala does not (yet).

Also, you didn't state why you suddenly wanted to remove apt, but I have some guesses:

  • You would like to "clean up" your packages.

    This is sometimes a good idea, but not when you're not sure of the consequences. Also, if you had read the first part of the nala readme:

    Nala is a front-end for libapt-pkg. Specifically we interface using the python-apt api.

    Or from the package info apt show nala:

    Commandline frontend for the APT package manager

    This should have given you a hint that it's dependent on apt.

  • You're satisfied with the performance of nala for common tasks, and thus don't need apt.

    You may think this is the case, but I'd argue it's not. nala is software in a development stage, while apt has existed for 30 years. Also, while nala provides the most common functionality of apt, it can't do any of the more advanced stuff, which you suddenly might need (like --dry-run) - and often when you least expect it. So for daily tasks nala might be OK - but it can probably never replace the full apt package.

Now to restore apt to your system after you have removed it, please see this Q&A. The file /var/log/apt/history.log should actually contain a list of all the packages that were removed, which you have to reinstall manually.

What you basically have to do is find the appropriate version of apt (example for Jammy) for your system and all it's dependent packages, and install these manually with dpkg (since you removed the only package manager that can actually handle dependencies for you).

  • 3
    Thank you for your attention, and providing me with bunch of knowledge on the basis of nala. Feb 2, 2023 at 13:19
  • 1
    You're welcome. And I sincerely hope you learned something from this - good luck! Feb 2, 2023 at 13:21
  • 1
    I would add to the answer that probably Nala informed OP that the command was about to remove the package nala, too, as one of its dependencies was not satisfied. And OP should have reviewed the output carefully before confirming, especially since they used the option --remove-essentials knowing the risk that it could break the system. Feb 3, 2023 at 8:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .