How to Install UNRAR on Ubuntu 26.04, 24.04 and 22.04

Last updated Wednesday, April 29, 2026 12:05 pm Joshua James 6 min read

RAR archives still appear in game mods, backup sets, software downloads, and files shared from Windows systems, but Ubuntu does not include a dedicated RAR extractor by default. To install unrar on Ubuntu, use RARLAB’s unrar package from Ubuntu’s multiverse component for current WinRAR and RAR5 archives, or choose unrar-free only when open-source licensing matters more than full compatibility.

If your search started with “WinRAR for Ubuntu,” the closest native option is a terminal workflow. WinRAR itself remains a Windows desktop product; on Ubuntu, RARLAB’s extractor handles existing .rar files, while the separate rar package creates new RAR archives when you need that capability.

Install UNRAR on Ubuntu

Refresh APT metadata and apply pending updates before installing archive tools. This reduces dependency issues and makes sure APT sees the latest package candidates for Ubuntu’s optional repository components:

sudo apt update && sudo apt upgrade

For a fuller APT maintenance walkthrough, see how to update packages from the Ubuntu command line.

These commands use sudo for tasks that need root privileges. If your account is not in the sudoers file yet, follow how to add a new user to sudoers on Ubuntu.

These steps cover Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS. Commands are the same across supported LTS releases unless a version-specific note says otherwise.

Choose one extractor for normal use. The proprietary unrar package is the practical default because it handles encrypted RAR5 archives and split archive sets. The open-source unrar-free package can extract some plain archives on newer Ubuntu releases, but its behavior differs by release and it does not provide reliable encrypted RAR5 support.

PackageCommandUbuntu componentBest fitImportant limits
unrarunrarmultiverseRecommended for current WinRAR, RAR5, encrypted, and multi-volume archivesProprietary freeware; extraction only
unrar-freeunrar-freeuniverseOpen-source-only workflows and simple unencrypted archivesLimited feature set; encrypted RAR5 fails; behavior varies by Ubuntu release
rarrarmultiverseOptional package for creating new .rar archivesNot needed for extraction; proprietary command-line tool

If you came looking for a manual “download unrar for Linux” file, RARLAB’s download page publishes Linux tarballs. For Ubuntu systems, the APT packages are easier to update, verify, and remove, so use the repository method unless you have a specific upstream-binary requirement.

Install RARLAB UNRAR on Ubuntu

Install the full RARLAB extractor from Ubuntu’s multiverse component:

sudo apt install unrar

Verify the installation by running unrar without arguments. The command does not use a normal --version flag, so the no-argument output is the simplest version check:

unrar

Relevant output on Ubuntu 26.04 includes:

UNRAR 7.20 freeware      Copyright (c) 1993-2026 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

Ubuntu 26.04 currently installs package version 1:7.2.4-1 and reports UNRAR 7.20. Ubuntu 24.04 installs 1:7.0.7-1build1 and reports UNRAR 7.00. Ubuntu 22.04 installs 1:6.1.5-1ubuntu0.1 and reports the older UNRAR 6.11 beta 1 banner. The extraction commands below work across all three releases.

The unrar package lives in multiverse, which contains software with licensing restrictions. Standard desktop installs often already have this component enabled, but minimal or customized systems may need to enable it first. The broader guide to enable Universe and Multiverse on Ubuntu explains how these components fit together.

Install unrar-free on Ubuntu

Install unrar-free only when you specifically want an open-source extractor and can tolerate limited compatibility:

sudo apt install unrar-free

Check the installed version:

unrar-free --version
unrar-free 0.3.3

Ubuntu 26.04 currently provides unrar-free 0.3.3, Ubuntu 24.04 provides 0.1.3, and Ubuntu 22.04 provides an older 0.0.2 build that prints unrar 0.0.2. Ubuntu 26.04 and 24.04 can extract a simple unencrypted RAR5 file, but encrypted RAR5 archives fail and Ubuntu 22.04’s older build is not reliable with modern fixtures. Use RARLAB’s unrar when compatibility matters.

Install RAR on Ubuntu for Archive Creation

The unrar and unrar-free packages extract existing archives only. If you need to create new .rar files, install the separate rar package from multiverse:

sudo apt install rar

Verify the command:

rar
RAR 7.20   Copyright (c) 1993-2026 Alexander Roshal   1 Feb 2026
Trial version             Type 'rar -?' for help

Usage:     rar <command> -<switch 1> -<switch N> <archive> <files...>

Ubuntu 26.04 currently offers rar 2:7.20-1, Ubuntu 24.04 offers 2:7.00-1build1, and Ubuntu 22.04 offers 2:6.23-1~22.04.1. You do not need this package if your only goal is to extract downloaded archives.

Extract RAR Files with UNRAR on Ubuntu

The examples below use RARLAB’s unrar package because it is the compatibility choice for current RAR archives. Replace archive.rar with your real filename. RAR files are not ZIP files, so unzip archive.rar is the wrong tool; use unrar, or install 7-Zip on Ubuntu when you want one tool for RAR, ZIP, 7z, and other formats.

List RAR Archive Contents

List the files before extraction so you can confirm the folder layout and exact paths inside the archive:

unrar l archive.rar

Extract RAR Files with Folders Preserved

For most archives, extract with full paths so files keep their original directory structure:

unrar x archive.rar

The x command protects files with the same name in different folders from flattening into one directory and overwriting each other.

Extract RAR Files Without Folders

Use e only when you intentionally want every file extracted into the current directory:

unrar e archive.rar

This flattened extraction can overwrite files with matching names, so list the archive first when you are unsure about its contents.

Extract RAR Files to a Directory

Add the destination directory after the archive name. UNRAR creates the directory if it does not already exist:

unrar x archive.rar /destination/path/

Extract One File from a RAR Archive

Use the path shown by unrar l when you only need one file. The destination directory remains optional:

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

With x, UNRAR preserves the selected file’s internal directory path under the destination.

Test RAR Archive Integrity

Test a RAR archive before extraction when the download is large, split across volumes, or likely to be incomplete:

unrar t archive.rar

A successful test ends with:

All OK

Extract Password-Protected RAR Archives

For sensitive archives, omit the password from the command line and let UNRAR prompt interactively:

unrar x archive.rar

When the archive is encrypted, UNRAR prompts for the password without echoing it to the terminal. This keeps the password out of shell history and process listings.

For throwaway local scripts where the password exposure is acceptable, the -p switch takes the password with no space after the flag:

unrar x -pYourPassword archive.rar

Passwords passed on the command line can appear in shell history and process listings. Prefer the interactive prompt for real archives that contain private data.

Exclude Files During RAR Extraction

Use one or more -x switches to skip unwanted file patterns while extracting. Quote the patterns so the shell passes the wildcards to UNRAR instead of expanding them first:

unrar x '-x*.tmp' '-x*.log' archive.rar

This example skips temporary and log files while extracting everything else.

Print a File from a RAR Archive

Print a text file from the archive to standard output without extracting the full archive:

unrar p archive.rar file.txt

This is useful for checking small README, license, or configuration files before you extract everything.

Use unrar-free Commands on Ubuntu

The unrar-free command uses GNU-style options instead of RARLAB’s single-letter command syntax. Use it only for archives you know it can handle:

TaskRARLAB unrarunrar-free
List contentsunrar l archive.rarunrar-free -t archive.rar
Extract with pathsunrar x archive.rarunrar-free -x archive.rar
Extract without pathsunrar e archive.rarunrar-free --extract-no-paths archive.rar
Print file to terminalunrar p archive.rar file.txtunrar-free -P archive.rar file.txt on Ubuntu 26.04 only
Encrypted RAR5SupportedNot reliable; use RARLAB unrar

Ubuntu 26.04 adds -P and --print to unrar-free. Ubuntu 24.04 and 22.04 do not provide that option, so use RARLAB’s unrar p command if printing files from archives matters across all supported LTS releases.

Troubleshoot UNRAR on Ubuntu

Fix Unable to Locate Package unrar

If APT returns E: Unable to locate package unrar, the multiverse component is probably disabled. Install the repository helper if needed, enable Multiverse, refresh package metadata, then retry:

sudo apt install software-properties-common
sudo add-apt-repository multiverse
sudo apt update
sudo apt install unrar

The unrar-free package comes from universe. If a minimal system cannot locate unrar-free, enable Universe with the same helper pattern but replace multiverse with universe.

Fix Encryption Not Supported in unrar-free

If unrar-free fails with an encryption message such as Reading encrypted data is not currently supported, switch to RARLAB’s extractor:

sudo apt remove unrar-free
sudo apt install unrar

Encrypted RAR5 archives are common in files created by current WinRAR versions, so this error is usually a package limitation rather than a bad password.

Fix Corrupted or Incomplete RAR Archives

If extraction stops with CRC errors or incomplete-file messages, test the archive first:

unrar t archive.rar

If the test fails, download the archive again or check whether the source provides recovery volumes such as .rev files. UNRAR can only extract data that is present and intact.

Extract Multi-Volume RAR Archives

Split archives need every part in the same directory, usually named like archive.part1.rar, archive.part2.rar, and so on. Start with the first part:

unrar x archive.part1.rar

RARLAB’s unrar automatically reads the following parts. If one part is missing, extraction fails and reports the missing volume.

Update UNRAR Packages on Ubuntu

Ubuntu updates these packages through APT. Use --only-upgrade when you want to update a package only if it is already installed:

sudo apt update
sudo apt install --only-upgrade unrar

Replace unrar with unrar-free or rar if that is the package you installed.

Remove UNRAR from Ubuntu

Remove only the package you installed. For broader package cleanup behavior, see the guide on removing packages on Ubuntu.

Remove RARLAB UNRAR

sudo apt remove unrar

Remove unrar-free

sudo apt remove unrar-free

Remove RAR

sudo apt remove rar

Verify that none of the archive packages remain installed:

dpkg -l unrar unrar-free rar 2>/dev/null | grep '^ii'

If the command prints no package lines, the selected packages are no longer installed. Review any separate sudo apt autoremove prompt before accepting it, because reused systems can have unrelated autoremovable packages from older work.

Conclusion

RARLAB’s unrar gives Ubuntu the most reliable path for current RAR5 downloads, encrypted archives, and split archive sets, while unrar-free stays useful only for narrow open-source or legacy cases. For broader archive work, install 7-Zip on Ubuntu, or use the unzip command guide when the file is actually a ZIP archive.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show more of our fresh Linux tutorials in Top Stories and From your sources when relevant.

Add LinuxCapable as a preferred source on Google
Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffeeBuy me a coffee
Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: