Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

How can I uncompress a *.7z file in Ubuntu and keep the directory structure?

share|improve this question

3 Answers 3

up vote 77 down vote accepted

First install the p7zip-full package:

sudo apt-get install p7zip-full

With this, Nautilus should have an option to uncompress 7-Zip Files.

I also recommend p7zip-rar so it also include the RAR files.

This is assuming you want to do it via GUI with Nautilus. If not, after downloading the packages above do the following:

7z x PACKAGE.7z that should eXtract the packages with full path.

share|improve this answer

There is also dtrx - which is immensely useful for un-archiving anything.

it stands for "Do The Right eXtraction" - and will uncompress anything without any fuss.


sudo apt-get install dtrx
dtrx archive.tar.XX


share|improve this answer
it currently supports [...] InstallShield files. very interesting. – LiveWireBT Feb 19 at 11:20
You saved me, for some reason p7zip couldn't handle my files but dtrx worked like a charm. – aconkey Jul 1 at 0:00
Mandatory cliche link: – Ciro Santilli 六四事件 法轮功 纳米比亚 威视 Oct 7 at 10:52

sudo apt-get install p7zip-full p7zip-rar in the terminal
Or search through the ubuntu software center as 7zip and unrar and install the packages

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.