Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a newbie Unix user. I have a file whose extension is pkg.tar.xz. How can I unpack this file on Windows or Unix?

I can use Cygwin but I'm not sure which utility I'd need to use. Any ideas?

share|improve this question

migrated from Jul 15 '11 at 7:24

This question came from our site for professional and enthusiast programmers.

You want to unpack it in windows? – Rahul Jul 14 '11 at 17:23
I see that you accepted my answer, but if your file's extension is really what you say it is, you should have accepted Bradley's answer. – parsifal Jul 14 '11 at 18:46
up vote 2 down vote accepted

If you've got Cygwin installed, then create a new directory and execute the following from within it:

tar zxvf FILE.tgz

If the person who produced the file was polite, it will contain its own top-level directory. If the person was impolite, it might contains lots of files, and you want a directory to contain them all.

share|improve this answer
The z in that won't work as it's an xz, not a gz. Meaning it's been packaged with LZMA instead of gzip. – Bradley Swain Jul 14 '11 at 17:24
@Bradley - my bad, I misread the OP. – parsifal Jul 14 '11 at 17:30
I did at first as well. :) – Bradley Swain Jul 14 '11 at 17:31
@upvoter - thanks, but Bradley's answer is the correct one – parsifal Jul 14 '11 at 17:35

In cygwin, you can use the following command at the command line: tar xvJf pkg.tar.xz. EDIT: note that that's a capital J, which is the flag for LZMA (xz), not a lower-case j, which is the flag for bzip2.

In Windows, I would recommend using 7-Zip

share|improve this answer

Googling around:

7-Zip supports xz as of version 9.04 beta

From Wikipedia

share|improve this answer

That is the Arch Linux package extension; like deb for 'ubuntu, debian or mint; or rpm for suse, RHEL, and centOS.

tar -xf *.tar.xz works for simple unzip.

You don't get anything human readable.

.pkg.tar.xz IS NOT SOURCE CODE.
To actually use it like a binary: in arch linux
sudo pacman -U ~/downloads/packages/packagename-ve.rsi.onnumber.pkg.tar.xz
proceed? [yes/n]
Installing packagename.versi.on 
[username@archlinux] $
share|improve this answer

You must log in to answer this question.

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