I've got a 20GB RAR file to extract with a password on Debian Linux Google Cloud VM.

I first tried sudo apt-get install unrar but the following output was given:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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

E: Package 'unrar' has no installation candidate

I found that this is likely to be because I don't have the multiverse activated, so I tried sudo add-apt-repository multiverse. This didn't work:

Error: 'multiverse' invalid

I eventually found a post saying that 'unrar free' could be installed. I installed it, and ran unrar-free -x -p Filename.rar. It is currently going through each file in the archive and giving the following output:

Extracting  Folder_name/image/0/1.jpg                                  Failed    
Extracting  Folder_name/image/0/10.jpg                                 Failed    
Extracting  Folder_name/image/0/100.jpg                                Failed    
Extracting  Folder_name/image/0/1000.bmp                               Failed

Apparently unrar-free is unable to extract archives in the RAR 3.0 format. I don't know how to tell which version of RAR this archive was compressed in.

How can I extract this RAR file?

I don't mind paying some money if it means faster extraction - I've got 140GB of RAR files to get through.

  • I was thinking 7-zip. should be available... though they do write this: "7-Zip 9.20 supports RAR 2/3/4 formats only and doesn't support RAR5 archives. But latest versions of 7-Zip supports RAR5 archives."
    – JoSSte
    Apr 10, 2021 at 21:14
  • free ≠ free of charge. Debian non-free is still as free of charge, as the other repositories. It is just that the software in there does not meet the Debian Free Software definition. Apr 10, 2021 at 22:50

3 Answers 3


You can extract RAR archives, including RAR 5 archives, in Debian with unar, which is available in the main repositories.

To be able to install the unrar package, you need to enable the non-free repositories (non-free in the “free as in freedom” sense):

sudo sed -i.bak 's/buster[^ ]* main$/& contrib non-free/g' /etc/apt/sources.list
sudo apt update

(The sed command adds contrib non-free to the end of every line containing “buster”; use the appropriate codename if you’re using a different release.)

This will allow you to run

sudo apt install unrar

and use that to extract your RAR archives.


Just use libarchive's bsdtar, like for all (most) other archive formats.

On Debian, it used to be in the bsdtar package, it's now in libarchive-tools (alongside bsdcpio and bsdcat).

bsdtar's CLI is tar-like (while bsdcpio's is cpio-like unsurprisingly), so to extract:

bsdtar xf file.rar

libarchive supports RAR 5.0 archives since version 3.4.0.


on Debian, when using command

sudo apt-get install unrar

simply hitting TAB will show you possible package names i..e, unrar-free

or you could type

sudo apt install unrar-free

that should do

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .