How To Use YUM on Ubuntu: Problem & Solutions
Yum is a package management tool used on Red Hat and distributions based on it. It’s used to install new packages and keep them up-to-date. But can you install YUM on other distributions like Ubuntu? That’s the question I will cover in this article.
YUM is not available on the latest Ubuntu versions. In fact, it’s not even included on Red Hat distributions, anymore, as it has been replaced with DNF in all recent versions. It’s not possible to install YUM on Ubuntu, and it doesn’t really make sense to try using it.
I’ll give you more context, so you can clearly understand the main differences between APT, YUM and DNF. I’ll also give you a few tips if you really want to use the YUM commands.
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!
Can you install YUM on Ubuntu?
In short, it’s not possible to use YUM on Ubuntu. The YUM package is no longer available on Ubuntu, and no YUM repository is available to match the latest versions of Ubuntu.
The issue
Ubuntu is based on Debian, which is built to use the APT package manager. Ubuntu is composed of a bunch of dpkg packages, hosted on the Ubuntu repositories. It doesn’t really make sense to try switching to a complete different system.
YUM was used on Red Hat or Fedora, and works with RPM packages. It’s not even the same package files on Debian-based and Red Hat-based distributions. It’s like wanting to use the Windows Store on macOS.
Even if you find a way to install YUM on Ubuntu, you’ll need to also find an updated repository and a way to install the RPM packages on Ubuntu, without breaking what is already installed by default. It looks like a tedious task, which doesn’t really make sense if the reason for trying this is just that you’re used to YUM.
Also: Need a clear GPIO pinout diagram? Here's mine.
Grab This Cheat Sheet!
I've compiled the must-know commands in a simple PDF for quick reference.
Download now
YUM vs DNF
In fact, even on Fedora and Red Hat-based recent distributions, YUM is no longer available. It has been replaced a few years ago with DNF.
DNF is an updated and improved version of YUM, meant to be faster and lighter to run. The commands are almost the same as with YUM. So, even on Fedora, it’s not necessarily a good idea to try to install YUM.

While testing things for this article, I noted that DNF is available in the Ubuntu repository, so I tried installing it. It works. Or at least, you can install the main package. I have DNF installed on my test virtual machine, but I can’t do anything with it.
Members get an ad-free version of every guide, plus exclusive project support.
Join the Community | Sign In

There is a warning with Python, but also DNF is unable to identify my system version, and so to find a repository compatible with it. And I don’t think there is any.
Stuck on this project? Ask me or other Pi users in the RaspberryTips Community. We help each other out and you'll get answers quick. Join and fix it together.
Solutions if you want to use Yum on Ubuntu
So, what can you do if you are switching from a Red Hat-based distribution to Ubuntu, and are lost with the package management system on your new system?
I see only one workaround to avoid loosing too much time in the command line. It’s just a temporary tip for the time you are still trying to use YUM or DNF, but it’s nothing magical.
Alternatively, maybe Ubuntu is not the right distribution for you. There are still excellent distributions based on Red Hat where you can use DNF (and perhaps even YUM for some of them).
You might also like: I've tested hundreds of Linux apps, here are the ones I recommend.
Create an alias
The workaround I have for you is to create an alias for the command you are used to type. For example, if you were using YUM all the time previously, you may still try to type it on Ubuntu, even if it doesn’t exist.
Instead of getting errors and having to retype the same syntax with APT, you can create an alias, that will replace “yum <options>” with “apt <options>” each time.
On Linux, you can create aliases for specific command
- Open or create this file:
nano ~/.bash_aliases - Add these lines in the file:
alias yum='apt '
alias sudo='sudo '
The second line is mandatory because most apt commands require administrator privileges. And when you use sudo, it won’t recognize the yum alias.
Another option is probably to add sudo in the first alias, and remove the second line. - Close your session and start a new one.
Maybe you restart the computer, close the SSH session, or restart the terminal.
The alias won’t work before a new session. - Now, if you run this command for example:
sudo yum updateIt should work.

Grab This Cheat Sheet!
I've compiled the must-know commands in a simple PDF for quick reference.
Download now
It’s just a little trick, but if you are bored to always use “yum” instead of “apt” on your new Ubuntu system, it might be enough for you.
Eventually, you’ll have to adapt and start using apt, but it’s the only thing I have for you if you want to continue using Ubuntu. At least, you won’t be too angry with your computer, it will understand what you mean when you type “yum” :-).
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.
Switch to a Red Hat-based distribution
But if you are used to the Red Hat way of doing things, like package management, maybe the right move for you is simply to stay on a Red Hat-based distribution.
Ubuntu might be the most popular Linux distribution currently, but it doesn’t mean it’s the ultimate choice, better than the other options.
Here are a few suggestions for you:
- Fedora: Fedora is like the Ubuntu equivalent for Red Hat users, so it seems an easy choice if you chose Ubuntu but want the Red Hat package manager.
Available for desktop usage, servers or even IoT, you’ll find the right version for you.
You can even install Fedora on Raspberry Pi (click on the link to read my tutorial). - Rocky Linux: With the end of life of CentOS, Rocky Linux is meant to be the natural successor.
Based on Red Hat Enterprise but rebuild for the community, so it’s free and stable, for any use. - AlmaLinux: A new distribution, with similar goals to Rocky Linux (CentOS replacement, compatible with RHEL, etc.).
I’m less familiar with it than the others, but it looks promising.
I know, I don’t have a magic solution to your initial question, but I hope that after reading this article, you better understand that installing YUM or DNF on Ubuntu is not a good idea.
You should either get used to APT, try the alias tip, or switch to a better distribution for you.
Whenever you're ready, here are other ways I can help you:
Master Linux Commands: Overwhelmed with Linux commands? This book is your essential guide to mastering the terminal. It includes practical tips, real-world examples, and a bonus cheat sheet to keep by your side.
The RaspberryTips Community: Need help with Linux or want to chat with people who actually get it? Join the RaspberryTips Community and get access to private forums, exclusive lessons, and direct support.
You can also find all my recommendations for tools and hardware on this page.
