How to Install UNRAR on Linux Mint

Linux Mint users frequently encounter RAR archives when downloading game mods, software packages, or files from sharing sites. This guide walks you through installing unrar on Linux Mint so you can extract RAR files directly from the terminal or integrate extraction into file managers like Nemo. By the end, you will have a working unrar installation verified with test commands and know the basic extraction syntax for everyday use.

Choose Your UNRAR Package

Linux Mint offers two unrar packages. The proprietary unrar package handles all RAR formats including RAR5, while unrar-free provides an open-source alternative with limited format support.

Featureunrar (Proprietary)unrar-free (GPL)
RAR5 supportYesNo
RAR3/RAR4 supportFullPartial (basic RAR3 only)
Password-protected archivesYesYes
Multi-volume archivesYesNo
Repositorymultiverseuniverse

Recommendation: Install unrar unless you specifically require open-source licensing. Most RAR files downloaded from the web use RAR5 compression, which only the proprietary package supports.

Update Linux Mint

First, update your package lists and upgrade existing software. Open your terminal with Ctrl+Alt+T and run:

sudo apt update && sudo apt upgrade

This command refreshes the list of available packages and upgrades any outdated software on your system.

Install UNRAR (Full RAR Support)

Next, install the proprietary unrar package from the multiverse repository:

sudo apt install unrar

Then verify the installation by running unrar without arguments to display the help screen:

unrar
UNRAR 7.00 freeware      Copyright (c) 1993-2024 Alexander Roshal

Usage:     unrar <command> -<switch 1> -<switch N> <archive> <files...>
               <@listfiles...> <path_to_extract/>

<Commands>
  e             Extract files without archived paths
  l[t[a],b]     List archive contents [technical[all], bare]
  p             Print file to stdout
  t             Test archive files
  v[t[a],b]     Verbosely list archive contents [technical[all],bare]
  x             Extract files with full path

The output confirms unrar is installed and ready to use. The version number may differ depending on when you install the package.

Install UNRAR-free (Open-Source Alternative)

Alternatively, if you prefer open-source software, install unrar-free instead. Note that this package cannot extract archives using RAR5 compression or newer RAR4 methods:

sudo apt install unrar-free

Verify the installation:

unrar-free --help
Usage: unrar-free [OPTION...] ARCHIVE [FILE...] [DESTINATION]
Extract files from rar archives.

  -x, --extract              Extract files from archive (default)
  -t, --list                 List files in archive
  -f, --force                Overwrite files when extracting
      --extract-newer        Only extract newer files from the archive
      --extract-no-paths     Don't create directories while extracting
  -p, --password             Decrypt archive using a password
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

The unrar-free package uses GNU-style command syntax with double-dash options, which differs from the standard unrar command syntax.

Extract RAR Archives

Once installed, you can extract RAR files using these common commands. The following examples use the proprietary unrar package:

Extract files while preserving the directory structure inside the archive:

unrar x archive.rar

Additionally, you can extract all files to the current directory without creating subdirectories:

unrar e archive.rar

To preview contents, list the files in an archive without extracting:

unrar l archive.rar

Extract to a specific directory:

unrar x archive.rar /path/to/destination/

Extract a password-protected archive:

unrar x -pYourPassword archive.rar

Finally, test archive integrity without extracting files:

unrar t archive.rar

Troubleshoot Common Issues

unrar: command not found

If you see this error after running an unrar command:

bash: unrar: command not found

The multiverse repository may not be enabled. Enable it and install unrar:

sudo add-apt-repository multiverse
sudo apt update
sudo apt install unrar

Unsupported archive format

When using unrar-free with a RAR5 archive, you may see:

unrar-free: archive.rar: Unsupported archive format

This happens because unrar-free cannot handle RAR5 compression. In this case, check which package you have installed:

apt list --installed | grep unrar
unrar-free/jammy,now 1:0.1.3-1build2 amd64 [installed]

If you have unrar-free but need RAR5 support, remove it and install the proprietary version:

sudo apt remove unrar-free
sudo apt install unrar

Incorrect password

Password-protected archives display this error when the password is wrong:

Encrypted file:  CRC failed in archive.rar (password incorrect ?)

Double-check the password and try again. If the archive is genuinely corrupt, re-download it from the source.

Remove UNRAR

To remove unrar from your system, use the appropriate command for your installed package:

sudo apt remove unrar

Or for unrar-free:

sudo apt remove unrar-free

Neither package stores user configuration files, so removal is complete after running the uninstall command.

Conclusion

You now have unrar configured on Linux Mint for extracting RAR archives. The unrar x command handles most extraction tasks while preserving directory structures, and unrar l lets you preview contents before extracting. As a result, Linux Mint’s default file manager Nemo also integrates with unrar automatically for right-click extraction once the package is installed.

2 thoughts on “How to Install UNRAR on Linux Mint”

  1. shit! Mint 21.3
    (py) 16:12:14al@alsdesk:~$ sudo apt install unrar
    Package unrar is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Error: Package ‘unrar’ has no installation candidate
    (py) 16:12:21al@alsdesk:~$ sudo apt install unrar-free
    Package unrar-free is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Error: Package ‘unrar-free’ has no installation candidate
    (py) 16:12:40al@alsdesk:~$

    Reply
    • Thanks for reporting this, Alfred. The “no installation candidate” error means the multiverse repository is not enabled on your system. Run these commands to fix it:

      sudo add-apt-repository multiverse
      sudo apt update
      sudo apt install unrar

      The multiverse repository contains the proprietary unrar package. Linux Mint 21.3 supports this repository since it is based on Ubuntu 22.04. If the command fails, you can also enable multiverse through the Software Sources application under “Official Repositories.”

      Reply

Leave a Comment