Sudo apt-get is a frequently used command line to manage the Debian packages. However, if you use this on a non-Debian device or if the apt package is not installed, you will get the Command not found error when trying to execute it.

Additionally, when this error pops up, users won’t be able to install, remove, update or manage the software packages.

In this article, we will cover this issue and help you find a resolution to this command error.

apt-update

What is sudo apt-get Command?

The Linux repositories have different packages available for the users. These packages can be installed using the apt-get commands. apt is simply a package manager that is used to install, remove, and update packages.

Probable Causes of this Error

apt-get commands are supported only by Debian-based distros like Ubuntu. However, if you are trying to use apt packages on Rpm-based distributions, you will get thesudo apt-get command not founderror. This error will also pop up if the location path for the apt package is missing.

How to Fix sudo apt-get Command Not Found?

The first step is to verify if you are using a Debian-based operating system. To see which distro you are using, executethelsb_release -acommand. This will give the description of the distribution and its current version.

install-xcode

If you have confirmed that you are using Debian Linux, then use these fixes to resolve the problem.

The major reason for the sudo apt-Get command not founderror is if it is not installed. To install the apt packages perform these steps,

In the minimal Debian versions, the sudo isn’t installed by default. You might get the command error in such a condition.

command-in-mac-terminal

To install the sudo, follow these steps:

Use Native Package Manager

If you have a Linux distro other than Debian, apt-get package manager will not work for you. You have to utilize the native ones for your system. The list of different package managers with their compatible Linux distros is listed here.