How to Uninstall Unrar on Linux

This guide provides straightforward instructions for removing or uninstalling the unrar utility from a Linux machine. Depending on the distribution you use—such as Ubuntu, Debian, Fedora, Arch Linux, or openSUSE—or whether it was installed from source, the exact command varies slightly. Follow the specific section below that corresponds to your package manager to clean up the utility and any associated configuration files.

Debian, Ubuntu, and Linux Mint (APT)

To remove unrar using the Advanced Package Tool (APT), open your terminal and run:

sudo apt remove unrar

If you also want to remove unused dependencies and configuration files associated with the package, run:

sudo apt purge unrar
sudo apt autoremove

Note: If you installed the open-source alternative package unrar-free, replace unrar with unrar-free in the commands above.

Fedora, RHEL, and CentOS (DNF/YUM)

On Fedora or RHEL-based systems using DNF, execute:

sudo dnf remove unrar

On older systems using YUM:

sudo yum remove unrar

Arch Linux and Manjaro (Pacman)

To remove unrar on Arch-based distributions, use pacman:

sudo pacman -R unrar

To remove the package along with its unneeded dependencies:

sudo pacman -Rs unrar

openSUSE (Zypper)

To remove unrar from openSUSE systems, run:

sudo zypper remove unrar

Removing Manually Installed or Compiled Unrar

If you installed unrar by downloading a pre-compiled binary or building it from source, package managers will not detect it. You must delete the executable manually.

  1. Locate the installation path of the binary:

    which unrar

    Typical output is /usr/local/bin/unrar or /usr/bin/unrar.

  2. Delete the file using root permissions:

    sudo rm /usr/local/bin/unrar

Verifying the Removal

To confirm that unrar has been completely removed from your system, run:

unrar

If the removal was successful, your shell will return an output such as bash: unrar: command not found.