top of page

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 repolist

Example output:


ree

If you want to see all repositories (including disabled ones):

sudo dnf repolist all
ree



Step 2: Checking System and DNF Version

You can check your system and DNF version:

cat /etc/os-release
dnf --version
ree

Step 3: Installing Software Packages

To install a package, use:

sudo dnf install packagename -y

Example – install the vim text editor:

sudo dnf install httpd -y
ree


ree

Step 4: Searching for Packages

If you’re not sure what a package is called, use:

sudo dnf search packagename

Example:

sudo dnf search nginx
ree

Step 5: Viewing Package Information

To get detailed info about a package:

sudo dnf info packagename

Example:

sudo dnf info vim
ree

Output will show the version, repository, and description.


Step 6: Updating Packages

To update all installed packages:

sudo dnf update -y

To update a specific package:

sudo dnf update packagename -y

To check for updates without installing:

sudo dnf check-update

Step 7: Removing Packages

To remove a package:

sudo dnf remove packagename -y

Example:

sudo dnf remove httpd -y
ree

To remove unused dependencies:

sudo dnf autoremove -y

Step 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
ree

To install a group:

sudo dnf groupinstall "Server with GUI" -y

To remove a group:

sudo dnf groupremove "Server with GUI" -y

Step 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:

  1. Install the repository package:

    sudo dnf install -y oracle-epel-release-el9

  2. Enable it:

    sudo dnf config-manager --enable ol9_developer_EPEL

To disable a repo:

sudo dnf config-manager --disable repo_id

Step 10: Viewing DNF History

You can view your package installation history:

sudo dnf history
ree

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
ree

To view how much cache space is used:

sudo du -sh /var/cache/dnf

Conclusion


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

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Post: Blog2 Post
  • LinkedIn

©2023 Proudly created with Wix.com

bottom of page