Oracle Linux Basic Administration Series - Part 2 - How to Manage Software Packages with DNF (YUM)
- Jason Beattie
- 19 hours ago
- 2 min read
After installing Oracle Linux, one of the first things every system administrator needs to learn is how to manage software packages — installing, updating, and removing applications.
Oracle Linux uses the DNF package manager (an improved version of YUM). It handles dependencies automatically and connects to repositories to download and install software easily.
In this blog, you’ll learn how to:
Understand repositories
Install, update, and remove software
Search for available packages
Manage groups and repositories
Step 1: Understanding DNF and Repositories
DNF (Dandified YUM) is the default package manager in Oracle Linux 8 and later. It uses software repositories (repos) — collections of software packages maintained by Oracle and other trusted sources.
To see which repositories are enabled:
sudo dnf repolistExample output:

If you want to see all repositories (including disabled ones):
sudo dnf repolist all
Step 2: Checking System and DNF Version
You can check your system and DNF version:
cat /etc/os-release
dnf --version
Step 3: Installing Software Packages
To install a package, use:
sudo dnf install packagename -yExample – install the vim text editor:
sudo dnf install httpd -y

Step 4: Searching for Packages
If you’re not sure what a package is called, use:
sudo dnf search packagenameExample:
sudo dnf search nginx
Step 5: Viewing Package Information
To get detailed info about a package:
sudo dnf info packagenameExample:
sudo dnf info vim
Output will show the version, repository, and description.
Step 6: Updating Packages
To update all installed packages:
sudo dnf update -yTo update a specific package:
sudo dnf update packagename -yTo check for updates without installing:
sudo dnf check-updateStep 7: Removing Packages
To remove a package:
sudo dnf remove packagename -yExample:
sudo dnf remove httpd -y
To remove unused dependencies:
sudo dnf autoremove -yStep 8: Managing Group Packages
DNF can install package groups — collections of related software (e.g., “Server with GUI”).
To list available groups:
sudo dnf group list
To install a group:
sudo dnf groupinstall "Server with GUI" -yTo remove a group:
sudo dnf groupremove "Server with GUI" -yStep 9: Enabling or Disabling Repositories
Sometimes, you may need to enable additional repositories.For example, to enable the EPEL (Extra Packages for Enterprise Linux) repository:
Install the repository package:
sudo dnf install -y oracle-epel-release-el9
Enable it:
sudo dnf config-manager --enable ol9_developer_EPEL
To disable a repo:
sudo dnf config-manager --disable repo_idStep 10: Viewing DNF History
You can view your package installation history:
sudo dnf history
To undo a transaction:
sudo dnf history undo <transaction_id>Bonus Tip: Cleaning the DNF Cache
Over time, DNF’s cache can take up space.Clean it with:
sudo dnf clean all
To view how much cache space is used:
sudo du -sh /var/cache/dnfConclusion
Now you know how to manage software efficiently in Oracle Linux using DNF.You can install, update, and remove packages, explore repositories, and keep your system clean and up-to-date.
In the next post, we’ll cover another key skill - configuring and managing network settings using both command-line and graphical tools.



Comments