How to extract tar.xz file

Hello all,

I was trying to extract tar.xz file in Ubuntu recently and was getting errors. The “Right click” –> “Extract” too din’t work. I assumed that as it was tar file it should have the capability to extract this file too. But it was not the case.

Here is how I extracted the tar.xz file:

  1. First of all we need to install xz-utils package so that the command works. You can install this by using the following command:

sudo apt-get install xz-utils

  1. Now give the following command to extract the file:

tar xJf foo.tar.xz

Thats it. This will do the trick. Now you can extract tar.xz file using the above tar command or using the “Right click” –> “Extract” method.

If you find any difficulty please leave a comment. I will appreciate a simple “Thanks” if that helps you.

Manohar Bhattarai (मनोहर भट्टराई)
Personal Website :
Personal Blog :

I am Manohar Bhattarai, a vivid java programmer. I am a keen Linux user. I currently boot Ubuntu Linux. I am a Free/Libre Open Source Software enthusiast.

Posted in Linux, Ubuntu, xz Tagged with: , , , , , , , , , , , , , , , , , , ,
3 comments on “How to extract tar.xz file
  1. Ahsan Tariq says:

    Thanks buddy… 🙂

  2. 3213 says:

    Couldn’t find package xz-utilsapt-get

    • I think you have a typo there. Please see xz-utilsapt-get is wrong. It should be xz-utils, please read the blog again carefully and type the command correctly. You will surely succeed in getting it work without any errors.

      Manohar Bhattarai

1 Pings/Trackbacks for "How to extract tar.xz file"
  1. woolrich jas dames says:

    cheers, 1st I was loosing on instruction of 2, and then it is quite effortless as an alternative while i look into the several instructions, super thank you!

Leave a Reply