{"id":2931,"date":"2025-03-07T10:00:54","date_gmt":"2025-03-07T10:00:54","guid":{"rendered":"https:\/\/blog.ssdnodes.com\/blog\/?p=2160"},"modified":"2025-05-18T13:03:34","modified_gmt":"2025-05-18T13:03:34","slug":"package-management-in-linux-use-apt-and-dnf","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/package-management-in-linux-use-apt-and-dnf\/","title":{"rendered":"Package Management in Linux: How to Use APT and DNF Commands"},"content":{"rendered":"<p>Ever stared at the terminal, wondering if your next command will install a cool <a href=\"https:\/\/en.wikipedia.org\/wiki\/Package_manager\" target=\"_blank\" rel=\"noopener\">software package<\/a> on your system, or break it completely?<\/p>\n<p>Linux package managers like <a href=\"https:\/\/en.wikipedia.org\/wiki\/APT_(software)\" target=\"_blank\" rel=\"noopener\">APT<\/a> and <a href=\"https:\/\/docs.rockylinux.org\/guides\/package_management\/dnf_package_manager\/\" target=\"_blank\" rel=\"noopener\">DNF<\/a> might seem daunting, but they're actually very easy to master once you understand how they work. The core concepts of package management are surprisingly simple, and they are guaranteed to make you 10X better at working with Linux.<\/p>\n<p>In this guide, I'll share the basics that helped me go from randomly copying commands from Stack Overflow to confidently <a href=\"https:\/\/www.ssdnodes.com\/blog\/tools-to-manage-multiple-linux-servers-free\/\">managing any Linux system<\/a>. I'll show you exactly how to master APT and DNF, the two most important package managers. No fluff, no theory overload, just practical easy-to-understand knowledge that will save you hours of debugging and prevent those dreaded system failures.<\/p>\n<p>Let's make package management click for you.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12045 size-full\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/Package-Management-in-Linux-Blog.jpg\" alt=\"Linux Package Management\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/Package-Management-in-Linux-Blog.jpg 600w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/Package-Management-in-Linux-Blog-300x200.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2><strong>Prerequisites for APT and DNF Package Managers<\/strong><\/h2>\n<p>To make the most out of this Linux package management guide, you\u2019ll need a <a href=\"https:\/\/www.ssdnodes.com\/blog\/what-is-a-vps-intro-to-virtual-private-servers\/\">VPS<\/a>:<\/p>\n<ul>\n<li>To learn how to use the APT package manager, you\u2019ll need a VPS running Ubuntu or Debian.<\/li>\n<li>To learn how to use the DNF package manager, you\u2019ll need a VPS running Rocky Linux, <a href=\"https:\/\/docs.fedoraproject.org\/en-US\/quick-docs\/dnf\/\" target=\"_blank\" rel=\"noopener\">Fedora<\/a>, CentOS Stream, or AlmaLinux.<\/li>\n<li>A non-root user with\u00a0<code>sudo<\/code>\u00a0privileges. Check out our\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/tutorial-setting-up-and-securing-ssh-based-authentication\/\">How to access your server using SSH<\/a>\u00a0guide to learn how to access your server and create a\u00a0<code>sudo<\/code>\u00a0user.<\/li>\n<li>Basic Linux command line knowledge.<\/li>\n<\/ul>\n<p>If you haven't noticed, we offer the best priced, most reliable\u00a0<a href=\"https:\/\/ssdnodes.com\/\" target=\"_blank\" rel=\"noopener\">Linux VPS servers<\/a>. Take a look at our\u00a0<a href=\"https:\/\/www.ssdnodes.com\/cheap-vps-hosting\/?utm_source=blog&amp;utm_medium=linux-managers\"><strong>deals<\/strong><\/a>\u00a0and prepare for your mind to be blown \ud83e\udd2f.<\/p>\n<h2>What is a Package Manager in Linux?<\/h2>\n<p>Package managers are used to distribute Linux software in pre-compiled bundles called packages. Think of them as app stores for your Linux system. They handle all the heavy lifting, downloading, installing, updating, and removing software.<\/p>\n<p>To manage packages, most Linux distributions make use of either APT (Advanced Package Tool) or DNF (Dandified YUM). These tools make sure you get the right versions of software and keep your system running smoothly.<\/p>\n<h3>What Two Linux Distributions Utilize the Debian Package Manager by Default?<\/h3>\n<p>Ubuntu and Debian are the two most popular distributions that use APT. Ubuntu is perfect for <a href=\"https:\/\/www.ssdnodes.com\/blog\/vps-beginners-guide\/\">beginners<\/a> and powers millions of servers worldwide, while Debian is known for its rock-solid stability. Both share the same powerful package management system that makes software installation a breeze.<\/p>\n<h3>Linux Distributions That Utilize the DNF Package Manager by Default<\/h3>\n<p>Fedora, Rocky Linux, and AlmaLinux are the main distributions that use DNF. Fedora leads the pack with cutting-edge features, while Rocky Linux and AlmaLinux are built for enterprise stability. These distributions switched from YUM to DNF for better performance and dependency handling.<\/p>\n<h3>APT vs DNF: What Is the Best Linux Package Manager?<\/h3>\n<p>Both APT and DNF are excellent at their jobs. There's no clear winner! APT has been around longer and has a larger package repository, while DNF offers more modern features like better dependency resolution and faster performance. Your choice really depends on which Linux distribution you're using.<\/p>\n<p>Now that you understand the basics of package managers, let's dive into the practical commands that will make you a Linux pro. I'll show you exactly how to find and install any software you need with our Linux Package Manager Cheat Sheet below!<\/p>\n<h2>Linux Package Manager Cheat Sheet<\/h2>\n<p>Here's your quick reference guide for both APT and DNF commands. I've paired them side by side so you can easily spot the similarities:<\/p>\n<table>\n<thead>\n<tr>\n<th>Action<\/th>\n<th>APT Command<\/th>\n<th>DNF Command<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Update package list<\/td>\n<td><code>apt update<\/code><\/td>\n<td><code>dnf check-update<\/code><\/td>\n<\/tr>\n<tr>\n<td>Upgrade all packages<\/td>\n<td><code>apt upgrade<\/code><\/td>\n<td><code>dnf upgrade<\/code><\/td>\n<\/tr>\n<tr>\n<td>Install a package<\/td>\n<td><code>apt install package<\/code><\/td>\n<td><code>dnf install package<\/code><\/td>\n<\/tr>\n<tr>\n<td>Remove a package<\/td>\n<td><code>apt remove package<\/code><\/td>\n<td><code>dnf remove package<\/code><\/td>\n<\/tr>\n<tr>\n<td>Search for a package<\/td>\n<td><code>apt search keyword<\/code><\/td>\n<td><code>dnf search keyword<\/code><\/td>\n<\/tr>\n<tr>\n<td>Show package info<\/td>\n<td><code>apt show package<\/code><\/td>\n<td><code>dnf info package<\/code><\/td>\n<\/tr>\n<tr>\n<td>Clean package cache<\/td>\n<td><code>apt clean<\/code><\/td>\n<td><code>dnf clean all<\/code><\/td>\n<\/tr>\n<tr>\n<td>List installed packages<\/td>\n<td><code>apt list --installed<\/code><\/td>\n<td><code>dnf list installed<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Pro Tip:<\/strong> Add <code>-y<\/code> to any install or remove command to skip the confirmation prompt. For example, to install <a href=\"https:\/\/www.ssdnodes.com\/blog\/how-to-use-nginx-as-a-reverse-proxy-with-ssl-tutorial\/\">Nginx<\/a>: <code>apt install -y nginx<\/code> or <code>dnf install -y nginx<\/code>.<\/p>\n<p>Now that you've got this handy cheat sheet, let's dive deeper into APT commands. I'll show you some cool tricks that aren't obvious from the basic syntax, like installing specific versions and managing dependencies. These will save you hours of troubleshooting down the road.<\/p>\n<h2>How to Use APT Commands in Linux<\/h2>\n<p>APT (Advanced Package Tool) is Linux's package management system. Here are the essential APT commands in Linux:<\/p>\n<ul>\n<li>Update package list: <code>apt update<\/code><\/li>\n<li>Install software: <code>apt install package<\/code><\/li>\n<li>Upgrade installed packages: <code>apt upgrade<\/code><\/li>\n<li>Remove software: <code>apt remove package<\/code><\/li>\n<li>Find packages: <code>apt search keyword<\/code><\/li>\n<\/ul>\n<p>Always run <code>apt update<\/code> before installing or upgrading packages to ensure you get the latest versions.<\/p>\n<p>Let's dive deeper in the next section and start with the most important task: installing packages...<\/p>\n<h4>Note: Do You Want to Practice These Commands Risk-Free?<\/h4>\n<blockquote><p>Want to master APT without worrying about breaking your system? The best way to do that is to get a fresh Ubuntu or Debian VPS where you can experiment freely. Try commands, test configurations, and if something breaks, just reset and start fresh in seconds.<\/p>\n<p><a href=\"https:\/\/ssdnodes.com\/\" target=\"_blank\" rel=\"noopener\">Get started with a VPS<\/a> for just $11\/month. With instant setup, and 14-day money-back guarantee. <a href=\"https:\/\/www.ssdnodes.com\/cheap-vps-hosting\/?utm_source=blog&amp;utm_medium=linux-managers\"><strong>Launch your sandbox \u2192<\/strong><\/a><\/p><\/blockquote>\n<h3>How to Install a Linux Package Using APT<\/h3>\n<p>Installing packages with APT is super straightforward. First, refresh your package list:<\/p>\n<pre><code class=\"language-bash\">sudo apt update<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11990\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-update.webp\" alt=\"linux package updates using apt\" width=\"700\" height=\"196\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-update.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-update-300x84.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-update-1024x287.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-update-768x215.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-update-1536x430.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Then install your software with a simple command:<\/p>\n<pre><code class=\"language-bash\">sudo apt install package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11991\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-install.webp\" alt=\"APT install\" width=\"700\" height=\"256\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-install.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-install-300x110.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-install-1024x374.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-install-768x280.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-install-1536x561.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Want to install multiple packages? Just list them with spaces:<\/p>\n<pre><code class=\"language-bash\">sudo apt install nginx php mysql-server<\/code><\/pre>\n<p>Now you have your packages installed. Great! But wait, what if your app needs a specific version to work properly? Let me show you a neat trick in the next section...<\/p>\n<h3>How to Install a Specific Version for a Package Using APT<\/h3>\n<p>Sometimes you need an exact version, maybe for compatibility or stability reasons. First, check available versions:<\/p>\n<pre><code class=\"language-bash\">sudo apt list -a package-name<\/code><\/pre>\n<p>For example:<\/p>\n<pre><code class=\"language-python\">sudo apt list -a nginx<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11992\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/list-a-nginx.webp\" alt=\"APT list -a \" width=\"700\" height=\"106\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/list-a-nginx.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/list-a-nginx-300x46.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/list-a-nginx-1024x156.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/list-a-nginx-768x117.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/list-a-nginx-1536x233.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Then install the version you want:<\/p>\n<pre><code class=\"language-bash\">sudo apt install package-name=1.18.0-0ubuntu1<\/code><\/pre>\n<p>To prevent automatic updates, 'pin' your version:<\/p>\n<pre><code class=\"language-bash\">sudo apt-mark hold package-name<\/code><\/pre>\n<p>The above command <strong>pins<\/strong> the package at its current version, and prevents <code>apt upgrade<\/code> or <code>apt dist-upgrade<\/code> from updating it.<\/p>\n<p>Now that you've got your perfect version installed, let's talk <a href=\"https:\/\/www.ssdnodes.com\/blog\/vps-security-critical-steps-to-secure-vps-servers\/\">security<\/a>. Keeping your packages updated is crucial to protect against vulnerabilities. I'll show you exactly how to do that next.<\/p>\n<h3>How to Upgrade a Linux Package Using APT<\/h3>\n<p>Stay secure by keeping packages up-to-date! First, refresh your package list:<\/p>\n<pre><code class=\"language-bash\">sudo apt update<\/code><\/pre>\n<p>See what needs upgrading:<\/p>\n<pre><code class=\"language-bash\">sudo apt list --upgradable<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11993\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-upgradable.webp\" alt=\"\" width=\"700\" height=\"215\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-upgradable.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-upgradable-300x92.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-upgradable-1024x314.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-upgradable-768x236.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-upgradable-1536x472.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Upgrade a specific package:<\/p>\n<pre><code class=\"language-bash\">sudo apt install --only-upgrade package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11994\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/install-only-upgrade.webp\" alt=\"APT install --only-upgrade\" width=\"700\" height=\"253\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/install-only-upgrade.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/install-only-upgrade-300x108.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/install-only-upgrade-1024x370.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/install-only-upgrade-768x277.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/install-only-upgrade-1536x554.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Or upgrade everything at once:<\/p>\n<pre><code class=\"language-bash\">sudo apt upgrade<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11995\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-upgrade.webp\" alt=\"Output for APT upgrade\" width=\"700\" height=\"111\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-upgrade.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-upgrade-300x47.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-upgrade-1024x162.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-upgrade-768x121.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-upgrade-1536x243.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>With the upgrades out of the way, sometimes things don't work out and you end up needing to remove packages. Removing them the wrong way can leave your system cluttered. In the next section, I\u2019ll show you how to properly remove packages.<\/p>\n<h3>How to Remove a Package with APT in Linux<\/h3>\n<p>We all have packages we don't need. Here's how to clean them up properly.<\/p>\n<p>This removes the package while preserving configuration files in case you want to reinstall the package later and keep your settings:<\/p>\n<pre><code class=\"language-bash\">sudo apt remove package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11996\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-remove-package.webp\" alt=\"APT remove package\" width=\"700\" height=\"125\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-remove-package.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-remove-package-300x54.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-remove-package-1024x183.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-remove-package-768x137.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-remove-package-1536x275.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>You can use <code>purge<\/code> to perform a complete removal of the package, including all configuration files, giving you a clean slate as if the package was never installed:<\/p>\n<pre><code class=\"language-nix\">sudo apt purge package-name<\/code><\/pre>\n<p>You can also clean up leftover dependencies using <code>autoremove<\/code>:<\/p>\n<pre><code class=\"language-bash\">sudo apt autoremove<\/code><\/pre>\n<p>Sometimes you may find yourself needing to remove packages and all their dependencies in one go. There's actually a special command for that, which I\u2019ll discuss in the next section.<\/p>\n<h3>How to Remove a Package and All Dependencies with APT<\/h3>\n<p>To completely remove a package and everything it brought with it, use the following command:<\/p>\n<pre><code class=\"language-bash\">sudo apt remove --auto-remove package-name<\/code><\/pre>\n<p>This command is generally safe to use, but you should be aware of what it does:<\/p>\n<ol>\n<li><code>apt remove<\/code> - Removes the specified package<\/li>\n<li><code>-auto-remove<\/code> - Also removes any dependencies that were automatically installed with the package and are no longer needed by other packages<\/li>\n<li>Keeps configuration files in place<\/li>\n<\/ol>\n<p>The key safety considerations are:<\/p>\n<ul>\n<li>Before running it, you should check what will be removed by first running:<br \/>\n<code>apt list --auto-removable<\/code><\/li>\n<li>Make sure the package you're removing isn't critical for your system<\/li>\n<li>Check the list of dependencies that will be removed to ensure nothing important will be affected<\/li>\n<\/ul>\n<h3>How to Remove a Package and Config Files Using APT in Linux<\/h3>\n<p>Configuration files can stick around even after removing a package. Here's how to get rid of everything:<\/p>\n<pre><code class=\"language-bash\">sudo apt purge package-name<\/code><\/pre>\n<p>Or for a total cleanup:<\/p>\n<pre><code class=\"language-bash\">sudo apt purge --auto-remove package-name<\/code><\/pre>\n<p>The <code>apt purge<\/code> command requires careful consideration, as it removes the package AND all its configuration files from your system. The main differences from <code>apt remove<\/code> are as follows:<\/p>\n<ol>\n<li><code>apt remove<\/code> - Only removes the package binaries<\/li>\n<li><code>apt purge<\/code> - Removes both the package binaries AND configuration files<\/li>\n<\/ol>\n<p>This command is safe to use IF:<\/p>\n<ul>\n<li>You're certain you want to completely remove all traces of the package<\/li>\n<li>You won't need the configuration files later<\/li>\n<li>The package isn't a critical system component<\/li>\n<\/ul>\n<p>To be extra careful, you can first check what will be removed:<\/p>\n<pre><code class=\"language-bash\">sudo apt show package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11997\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-show.webp\" alt=\"APT show\" width=\"700\" height=\"253\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-show.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-show-300x108.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-show-1024x370.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-show-768x277.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-show-1536x554.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Then see what depends on this package:<\/p>\n<pre><code class=\"language-bash\">sudo apt-cache rdepends package-name<\/code><\/pre>\n<p>For example:<\/p>\n<pre><code class=\"language-python\">sudo apt-cache rdepends nginx-common<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11999\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-cache-rdepends-1.webp\" alt=\"apt-cache rdepends\" width=\"700\" height=\"111\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-cache-rdepends-1.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-cache-rdepends-1-300x47.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-cache-rdepends-1-1024x162.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-cache-rdepends-1-768x121.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-cache-rdepends-1-1536x243.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Now that we've covered cleanup, you might be wondering about that <code>autoremove<\/code> command we've mentioned.<\/p>\n<h3>Understanding the <code>apt autoremove command<\/code><\/h3>\n<p>The <code>apt autoremove<\/code> command is your system's janitor specialist. Here's how it works: when you install a package (let's say Firefox), Ubuntu also installs dependencies (like specific libraries) that Firefox needs. Later, if you remove Firefox, these dependencies stick around because they <em>might<\/em> be needed by other packages. <code>apt autoremove<\/code> essentially finds and deletes these leftover dependencies.<\/p>\n<p>Speaking of finding and removing packages, you'll often need to search for specific software before installing it. That happens to be the next section\u2019s topic.<\/p>\n<h3>How to Search for a Package Using APT in Linux<\/h3>\n<p>To search for a package using APT, you can use a keyword to search for packages by name and description:<\/p>\n<pre><code class=\"language-bash\">sudo apt search keyword<\/code><\/pre>\n<p>Search only package names (useful for more specific results):<\/p>\n<pre><code class=\"language-bash\">sudo apt list | grep keyword<\/code><\/pre>\n<p>For example:<\/p>\n<pre><code class=\"language-python\">sudo apt list | grep nodejs<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12000\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-grep.webp\" alt=\"apt list grep\" width=\"700\" height=\"125\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-grep.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-grep-300x54.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-grep-1024x183.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-grep-768x137.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2018\/06\/apt-list-grep-1536x275.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Get detailed information about a specific package:<\/p>\n<pre><code class=\"language-bash\">sudo apt show package-name<\/code><\/pre>\n<h3>What's the Difference Between APT and dpkg?<\/h3>\n<p>Think of <code>dpkg<\/code> as the worker and APT as the manager. While APT handles everything automatically, <code>dpkg<\/code> does the actual installation work. APT figures out dependencies, downloads packages, and then tells <code>dpkg<\/code> what to do.<\/p>\n<p><code>dpkg<\/code> will install a local <code>.deb<\/code> file directly, but won't resolve or install any dependencies:<\/p>\n<pre><code class=\"language-bash\">sudo dpkg -i package.deb<\/code><\/pre>\n<p>APT will install a local .deb file and automatically handle all required dependencies:<\/p>\n<pre><code class=\"language-bash\">sudo apt install .\/package.deb<\/code><\/pre>\n<p>Now that you've mastered APT, let's explore its twin brother from another mother. The DNF package manager.<\/p>\n<h2>How to Use DNF Commands<\/h2>\n<p>DNF (Dandified YUM) is the package manager for RPM-based Linux distributions like Fedora and Rocky Linux. Here are the essential DNF commands:<\/p>\n<ul>\n<li>Update package list: <code>dnf check-update<\/code><\/li>\n<li>Install software: <code>dnf install package<\/code><\/li>\n<li>Upgrade installed packages: <code>dnf upgrade<\/code><\/li>\n<li>Remove software: <code>dnf remove package<\/code><\/li>\n<li>Find packages: <code>dnf search keyword<\/code><\/li>\n<\/ul>\n<p>Always run <code>dnf check-update<\/code> before installing or upgrading packages to ensure you get the latest versions.<\/p>\n<p>Let's dive deeper in the next few sections and explore DNF's powerful features for managing your Linux packages.<\/p>\n<h4>Note: Practice These Commands on a Live VPS<\/h4>\n<blockquote><p>Want to practice without fear of breaking your system? Spin up a fresh VPS running Rocky Linux, Fedora, CentOS Stream, or AlmaLinux. You can experiment, break things, and reset with zero risk.<br \/>\nReady to dive in? Our Linux VPS servers start at just $11\/month, with instant setup and a 14-day money-back guarantee. <a href=\"https:\/\/www.ssdnodes.com\/cheap-vps-hosting\/?utm_source=blog&amp;utm_medium=linux-managers\"><strong>Check out our deals \u2192<\/strong><\/a><\/p><\/blockquote>\n<h3>The Difference Between YUM and DNF<\/h3>\n<p>DNF is basically YUM's cooler, faster cousin. While YUM (Yellowdog Updater Modified) did the job, it had some issues with memory usage and slow dependency resolution. DNF fixed these problems and added some neat features like parallel downloads and better conflict handling.<\/p>\n<p>Here is a quick comparison:<\/p>\n<pre><code class=\"language-bash\"># Old YUM command\r\nyum check-update\r\n\r\n# New DNF command - faster and more efficient\r\ndnf check-update<\/code><\/pre>\n<p>Speaking of improvements, let me show you how easy it is to install packages with DNF.<\/p>\n<h3>How to Install a Package with Linux DNF<\/h3>\n<p>Installing packages with DNF is straightforward. First, update your package list:<\/p>\n<pre><code class=\"language-bash\">sudo dnf check-update<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12002\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-check-update.webp\" alt=\"dnf check-update\" width=\"700\" height=\"230\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-check-update.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-check-update-300x98.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-check-update-1024x336.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-check-update-768x252.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-check-update-1536x504.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Then install your package:<\/p>\n<pre><code class=\"language-bash\">sudo dnf install package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12003\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-package.webp\" alt=\"dnf install package\" width=\"700\" height=\"319\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-package.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-package-300x137.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-package-1024x467.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-package-768x350.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-package-1536x700.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>If you want to install multiple packages:<\/p>\n<pre><code class=\"language-bash\">sudo dnf install package1 package2 package3<\/code><\/pre>\n<p>DNF offers a great feature that allows you to see what's going to happen before you commit:<\/p>\n<pre><code class=\"language-bash\">sudo dnf install --assumeno package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12004\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-assumeno.webp\" alt=\"dnf install --assumeno\" width=\"700\" height=\"319\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-assumeno.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-assumeno-300x137.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-assumeno-1024x467.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-assumeno-768x350.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-install-assumeno-1536x700.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>The command above shows you what would happen without actually installing the package.<\/p>\n<p>But what if you need a specific version of a package? Maybe for compatibility reasons or to avoid bugs introduced in a specific newer version? The next section explains how to do this in detail.<\/p>\n<h3>How to Install a Specific Version for a Package Using DNF<\/h3>\n<p>To find and install a specific version, first, see what versions are available:<\/p>\n<pre><code class=\"language-bash\">sudo dnf list --showduplicates package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12005\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-list-showduplicates.webp\" alt=\"dnf list --showduplicates\" width=\"700\" height=\"106\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-list-showduplicates.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-list-showduplicates-300x46.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-list-showduplicates-1024x156.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-list-showduplicates-768x117.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-list-showduplicates-1536x233.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Then install the version you want:<\/p>\n<pre><code class=\"language-bash\">sudo dnf install package-name-2.4.1<\/code><\/pre>\n<p>Now that you've got your packages installed, you'll want to know how to keep them updated to stay secure. Let me show you the right way to handle updates in the next section.<\/p>\n<h3>How to Upgrade a Linux Package with DNF<\/h3>\n<p>Keeping your packages updated is crucial for security and performance. Here's how to do it with DNF:<\/p>\n<p>First, check what updates are available:<\/p>\n<pre><code class=\"language-bash\">sudo dnf check-update<\/code><\/pre>\n<p>Update a specific package:<\/p>\n<pre><code class=\"language-bash\">sudo dnf upgrade package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12006\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-upgrade-package.webp\" alt=\"dnf upgrade package\" width=\"700\" height=\"240\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-upgrade-package.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-upgrade-package-300x103.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-upgrade-package-1024x351.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-upgrade-package-768x263.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-upgrade-package-1536x527.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Or update everything at once:<\/p>\n<pre><code class=\"language-bash\">sudo dnf upgrade<\/code><\/pre>\n<p>Pro tip: Use <code>dnf upgrade --refresh<\/code> to force a metadata update before upgrading.<\/p>\n<h3>How to Remove a Package Linux DNF<\/h3>\n<p>If you got packages taking up space, and wanted to remove some unnecessary packages, here's how to clean them out:<\/p>\n<pre><code class=\"language-bash\">sudo dnf remove package-name<\/code><\/pre>\n<p>It is best practice to run the following command before you remove anything to see what would be removed and what processes will run:<\/p>\n<pre><code class=\"language-bash\">sudo dnf remove --assumeno package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12007\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-remove-assumeno.webp\" alt=\"dnf remove --assumeno\" width=\"700\" height=\"344\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-remove-assumeno.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-remove-assumeno-300x148.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-remove-assumeno-1024x504.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-remove-assumeno-768x378.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-remove-assumeno-1536x756.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>This <code>dnf remove<\/code> command uninstalls a packages but keeps its configuration and dependencies. Sometimes, you do need to do a deeper clean and remove all related dependencies.<\/p>\n<h3>How to Remove a Package and Dependencies using DNF<\/h3>\n<p>For a thorough cleanup, use the <code>autoremove<\/code> and <code>clean all<\/code> commands:<\/p>\n<pre><code class=\"language-bash\">sudo dnf autoremove package-name    # Removes package and unused dependencies\r\nsudo dnf clean all    # Cleans all cached files<\/code><\/pre>\n<p>If you want to remove all orphaned dependencies:<\/p>\n<pre><code class=\"language-bash\">sudo dnf autoremove<\/code><\/pre>\n<p>Uninstalling packages is now done. But, one of the hardest problems in Linux is to find the right package to install. That's where DNF's search features come in handy.<\/p>\n<h3>How to Search for a Package in Linux DNF<\/h3>\n<p>DNF offers several powerful search methods. Each command serves a specific purpose and helps you find exactly what you need.<\/p>\n<p>For a broad search across all package information:<\/p>\n<pre><code class=\"language-bash\">sudo dnf search keyword    # Searches package names and descriptions<\/code><\/pre>\n<p>Example:<\/p>\n<pre><code class=\"language-python\">sudo dnf search nginx<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12008\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-search-nginx.webp\" alt=\"dnf search for a package\" width=\"700\" height=\"240\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-search-nginx.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-search-nginx-300x103.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-search-nginx-1024x351.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-search-nginx-768x263.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-search-nginx-1536x527.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>To search only through package names for more precise results:<\/p>\n<pre><code class=\"language-bash\">sudo dnf list | grep keyword    # only package names<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12009\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/sudo-dnf-list-grep.webp\" alt=\"dnf list packages\" width=\"700\" height=\"211\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/sudo-dnf-list-grep.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/sudo-dnf-list-grep-300x90.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/sudo-dnf-list-grep-1024x308.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/sudo-dnf-list-grep-768x231.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/sudo-dnf-list-grep-1536x462.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>To get detailed information about a specific package:<\/p>\n<pre><code class=\"language-bash\">sudo dnf info package-name<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12010\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-info.webp\" alt=\"Get information on a package in DNF\" width=\"700\" height=\"270\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-info.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-info-300x116.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-info-1024x395.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-info-768x296.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-info-1536x593.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>One of DNF's most powerful features is the ability to find packages by the commands they provide:<\/p>\n<pre><code class=\"language-bash\">sudo dnf provides *\/command    # Finds which package provides a specific command<\/code><\/pre>\n<p>For instance:<\/p>\n<pre><code class=\"language-bash\">sudo dnf provides *\/ifconfig<\/code><\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12011\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-provides.webp\" alt=\"dnf provides command\" width=\"700\" height=\"196\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-provides.webp 2000w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-provides-300x84.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-provides-1024x287.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-provides-768x215.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/01\/dnf-provides-1536x430.webp 1536w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>This tells us that the <code>ifconfig<\/code> command is provided by the <strong><code>net-tools<\/code><\/strong> package.<\/p>\n<h3>What's the Difference Between DNF and RPM?<\/h3>\n<p>RPM and DNF work at different levels of your system. RPM (Red Hat Package Manager) is the basic package handler; it knows how to install and remove packages, but that's about it. DNF is the smart layer on top that handles all the complex tasks.<\/p>\n<p>Think of it like this: RPM is like manually installing an app on your phone, while DNF is like using the app store that handles everything for you.<\/p>\n<p>The basic RPM commands are simple but risky:<\/p>\n<pre><code class=\"language-bash\">sudo rpm -i package.rpm\r\nsudo rpm -e package-name<\/code><\/pre>\n<p>The <code>-i<\/code> flag tells RPM to install a package, while <code>-e<\/code> removes it. But these commands can fail if dependencies are missing or break other packages that depend on the software you're removing.<\/p>\n<p>DNF makes the same operations safe and automatic:<\/p>\n<pre><code class=\"language-bash\">sudo dnf install package-name\r\nsudo dnf remove package-name<\/code><\/pre>\n<p>When you use DNF to install or remove packages, it checks all dependencies, installs what's needed, and makes sure removal won't break your system.<\/p>\n<p>This is why I always recommend using DNF instead of RPM directly. It's safer and prevents those dreaded dependency nightmares that can break your system.<\/p>\n<h2>Conclusion<\/h2>\n<p>Congratulations! You've learned the essential skills for managing packages on Linux systems. You now know how to install, update, remove, and search for packages using both APT and DNF. More importantly, you understand how these package managers work under the hood and how to avoid common pitfalls that can break your system.<\/p>\n<p>Remember the key points:<\/p>\n<ul>\n<li>Always update your package list before installing new software<\/li>\n<li>Use version-specific installations when compatibility matters<\/li>\n<li>Clean up unused packages and dependencies regularly<\/li>\n<li>Let the package manager (APT\/DNF) handle dependencies instead of using low-level tools (dpkg\/rpm)<\/li>\n<\/ul>\n<p>Whether you're working with Ubuntu, Debian, Fedora, or Rocky Linux, you now have the knowledge to maintain your system like a pro. No more copying and pasting commands without understanding them!<\/p>\n<p>Want to take your Linux skills to the next level? Check out our guides on <a href=\"https:\/\/www.ssdnodes.com\/blog\/vps-security-critical-steps-to-secure-vps-servers\/\">system security<\/a>, Linux <a href=\"https:\/\/www.ssdnodes.com\/blog\/tools-to-manage-multiple-linux-servers-free\/\">server management<\/a>, securing your applications with <a href=\"https:\/\/www.ssdnodes.com\/?p=9991&amp;preview=true\">Let\u2019s Encrypt<\/a> and <a href=\"https:\/\/www.ssdnodes.com\/blog\/vps-beginners-guide\/\">self-hosted apps<\/a>. With our blog, your journey to Linux mastery has just began.<\/p>\n<h2>FAQ: <strong>Package Management in Linux<\/strong><\/h2>\n<h3>What package manager does Rocky Linux use?<\/h3>\n<p>Rocky Linux uses DNF (Dandified YUM) as its package manager, inheriting this from its RHEL heritage. DNF replaced YUM as the default package manager, offering improved dependency resolution, better performance, and more modern features. Rocky Linux users can manage their software using DNF commands, and it's fully compatible with RPM packages.<\/p>\n<h3>What is the best Linux package manager?<\/h3>\n<p>There isn't a single \"best\" package manager as each serves different needs. APT excels in Debian-based systems with extensive repository support, while DNF offers superior dependency resolution and module management in RHEL-based systems. The best choice depends on your distribution, needs, and familiarity with the system.<\/p>\n<h3>What package manager does Ubuntu use?<\/h3>\n<p>Ubuntu uses APT (Advanced Package Tool) as its primary package manager, with DPKG working underneath. APT provides high-level package management, handling dependencies and repositories, while DPKG manages the low-level package operations.<\/p>\n<h3>Which command-line command is used for package management in Debian distributions including Ubuntu?<\/h3>\n<p>The <code>apt<\/code> command is the modern command-line tool for package management in Debian-based distributions. While older commands like <code>apt-get<\/code> and <code>apt-cache<\/code> still work, <code>apt<\/code> provides a more user-friendly interface combining the most commonly used features of both tools with improved output formatting and progress displays.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux package managers might seem a daunting task, but they&#8217;re easy to master once you understand how they work.<\/p>\n","protected":false},"author":19,"featured_media":12044,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18,30],"tags":[265,266],"class_list":["post-2931","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-tutorials","tag-apt","tag-yum"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=2931"}],"version-history":[{"count":11,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2931\/revisions"}],"predecessor-version":[{"id":13008,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2931\/revisions\/13008"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/12044"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=2931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=2931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=2931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}