How to Fix the ‘apt-get command not found’ Error on Linux
The “apt” or “apt-get” commands are essential on Linux systems. But what do you do when they’re not available and all you get is a “command not found” error message? Well, I can help.
The “apt-get: command not found” error most likely happens when trying to use the APT package manager on a non Debian-based Linux system. It can be fixed by using the proper command for your specific distribution.
A little lost? Let me explain and give you some tips on how to get around this problem.
If you need help with Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your system. Click here to get it for free!
“apt-get: command not found” – What does it mean?
APT is the package manager on Debian-based distributions, and the apt-get command is the one used to install new applications. This error most likely means that APT is not installed on the operating system.

What is APT?
On Debian-based distributions, APT is like the App store on your phone. It knows all the applications available, their latest versions, and you can use the “apt” command and its variations to find and install new packages.
So, if it’s not available, it’s pretty annoying. The latest iPhone without the app store is not that useful.
In the next section, I’ll show you how to fix this error, but I just wanted to make sure you understood what it means.
Check this: Need a clear GPIO pinout diagram? Here's mine.
Apt vs apt-get
Also, I have to mention one last point before moving further.
You may find references to “apt” or “apt-get” online. You can use both. “apt” has been added more recently to simplify the command usage, but it does the same thing in the background.
| Apt usage | Apt-get equivalent |
|---|---|
| apt update | apt-get update |
| apt install <package> | apt-get install <package> |
| apt upgrade | apt-get upgrade |
| apt search <name> | apt-cache search <name> |
| apt remove <package> | apt-get remove <package> |
In all my tutorials on this website, I now mention “apt” instead of “apt-get”, “apt-cache”, etc. But if you are familiar with the old way, it’s not a problem.
Bonus tip: At some point, you’ll get tired of copying commands without really understanding them. I put together a cheat sheet with 74 essential commands and simple examples. Grab the file here (free).
If you’re tired of copy/pasting commands without really understanding them, this book will help you finally feel confident in the Linux terminal.
Improve your Linux skillsYou can get answers from real experts in minutes.
Get help with your setup
The main problem we need to fix now is how to get rid of this “command not found” error, whether you use one or the other!
Tip: Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them. You can grab the PDF here if you want to save some time.
Still stuck after following this guide? Drop your question in the RaspberryTips Community — real Pi users answer fast. Post your question here.
Fixing the “apt-get: command not found” error

If you’re sure it’s not just a typo and you haven’t typed “atp-get install” or something similar, here are a few things you can try.
Make sure you’re using a Debian-based distribution
As mentioned in the introduction, the main reason why we get the error “apt-get: command not found” is that the system we are connected to is not based on Debian.
So before trying anything else, just make sure to check what system you’re using.
The “apt” and “apt-get” commands are only available by default on Debian-based distributions, which include: Debian, Ubuntu (and all its variations), Kali Linux, Linux Mint, Raspberry Pi OS (formerly Raspbian), MX Linux, Zorin, etc.
If you use other popular Linux distributions, like Fedora, Arch / Manjaro, SUSE / openSUSE, Gentoo or Alpine, you’re trying to use the wrong tool. These distributions have a different package manager, and a different command (as we’ll see next).
How to know which distribution you use?
- In most cases, you’ll have a logo or name mentioning it in the boot process, login screen or wallpaper.
- If you have access to the command line, you can try this command:
lsb_release -aIt will give the Linux distribution name and version, something like:
- If a GUI is installed, you can also visit the “About” section in the system settings.
Here is an example on Ubuntu:
Using other package managers
On a non-Debian-based system, an alternative to APT is available to install and manage applications on your system. For example, Red Hat base distributions use DNF instead of APT.
Here is a list of the package managers available for the most popular systems and distributions:
| Linux Base | Examples | Package manager |
|---|---|---|
| Debian | Ubuntu, Kali, Linux Mint | APT |
| Red Hat | Fedora, CentOS, Rocky Linux | DNF (or YUM) |
| Arch | Manjaro | Pacman |
| SUSE | openSUSE | Zypper |
| Gentoo | Gentoo | Portage |
Check the documentation from your system to know how to use these package managers. They are often very similar to APT, but you may need a bit of practice to get used to them.
Bonus tip: At some point, you’ll get tired of copying commands without really understanding them. I put together a cheat sheet with 74 essential commands and simple examples. Grab the file here (free).
I have several tutorials on the website that you can check for examples:
- How to Install Gentoo Linux on Raspberry Pi? (Quick Method)
- How To Install And Use Fedora On Your Raspberry Pi?
- How to Install Manjaro on Raspberry Pi?
They are all for Raspberry Pi, but you can skip the installation part (as you already have it), and just check the section where I introduce the package manager usage.
Installing APT
Now, if you are sure that you are on a Debian-based distribution, but for some reason, the “apt” command is not installed, then you can try to install it manually.
On Debian-based systems, we can use “dpkg” to install manually a “.deb” file to add a new application to the system.
While APT is used on top of this in most cases, if “apt” is missing, here’s what you can try:
- Go to the official website and find the package pages.
In general, you’ll have a search engine, where you can find and download most packages for your system. - Do a quick search for “apt” and see if you can find the package for your system version.
For Debian it might be this page, and for Ubuntu this one.
These links are for specific versions, so take them as examples, but pick the right version for you. - Download the .deb package for your system architecture.
For Debian and Ubuntu, there is a table at the bottom of the page with the architecture list.
You then need to pick a mirror server to download the package. - Once the package is downloaded, install it manually:
sudo dpkg -i <package_name.deb>
If dependencies are missing, repeat the same process to install them, one by one, with their .deb file (or from the sources in some cases). That’s the part where we’re glad APT exists. Most of the time, we no longer worry about dependencies once the system is properly installed :-).
You may find APT available for other systems, but it’s generally a bad idea. It’s not built for it, and will most likely break your system.
If you’re not using a distribution based on Debian, it’s not the end of the world. Just take the time to learn how their package manager works. After a few installations, you’ll be up to speed. Most of the other commands are the same anyway.
Related: How To Use ‘apt’: The Complete Linux Command Guide
Not getting the same result?
Even when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.
- Get help on your exact issue
- Access step-by-step videos for tricky setups
- Browse the website without ads
