How to Update unrar on CentOS
This guide covers the package manager commands required to update the
unrar utility on CentOS systems. Keeping unrar
updated ensures compatibility with newer archive formats and patches
known security vulnerabilities. Below, you will find direct instructions
for updating the package using standard repository managers like YUM and
DNF, along with steps to verify your installation.
1. Enable the EPEL Repository
The unrar package is proprietary and typically hosted in
the Extra Packages for Enterprise Linux (EPEL) repository or third-party
repositories rather than the default base repositories. Ensure EPEL is
active before attempting to update:
For CentOS 7:
sudo yum install epel-releaseFor CentOS 8 or CentOS Stream:
sudo dnf install epel-release2. Update unrar Using YUM (CentOS 7)
If you are running CentOS 7, use the yum package manager
to check for updates and upgrade unrar.
To check if an update is available:
sudo yum check-update unrarTo update unrar to the latest version:
sudo yum update unrar -y3. Update unrar Using DNF (CentOS 8 / CentOS Stream)
On CentOS 8 and newer versions, dnf replaces
yum as the primary package manager (though yum
commands will alias to dnf).
To check for available updates:
sudo dnf check-update unrarTo update unrar:
sudo dnf update unrar -y4. Verify the Installed Version
After running the update commands, verify that the package was successfully upgraded by checking the installed version:
unrar --versionAlternatively, you can query the RPM database to view package details:
rpm -q unrar