Menu
User

DropVPS Team

Writer: Cooper Reagan

How to Install Package on CentOS8?

How to Install Package on CentOS8?

Publication Date

07/05/2025

Category

Articles

Reading Time

2 Min

Table of Contents

In CentOS 8, package management is handled by dnf, the successor to yum. You can also install .rpm files manually or use third-party repositories like EPEL.

Install Packages Using dnf

The standard way to install software:

sudo dnf install package-name

Example – to install wget:

sudo dnf install wget

Before installing anything, it’s best to update the metadata:

sudo dnf makecache

And to upgrade everything:

sudo dnf upgrade -y

Search for Available Packages

To search for a package before installing:

dnf search package-name

Or to get detailed info:

dnf info package-name

dnf info package-name

Install .rpm Files Manually

If you’ve downloaded an RPM package:

sudo dnf install ./package-name.rpm

This method is preferred over rpm -i because dnf resolves dependencies.

Enable EPEL Repository

Some packages are not available in the base CentOS 8 repo. To access more packages:

sudo dnf install epel-release

Then you can install packages from EPEL, like htop:

sudo dnf install htop

Check Installed Packages

To see if a package is installed:

rpm -q package-name

Or list all installed packages:

dnf list installed
Linux VPS
🐧Linux VPS

Need a Linux Server for This?

Run Debian, Ubuntu, or any Linux distro on DropVPS — fast NVMe SSD, full root access, and 24/7 support. Perfect for everything you just read.

  • Full Root Access
  • Debian & Ubuntu Ready
  • 99.99% Uptime
  • 24/7 Support
Get Linux VPS →

No commitment · Cancel anytime

U
Loading...

Related Posts