Skip to content

Instantly share code, notes, and snippets.

@adityaiitb
Created July 25, 2020 23:50
Show Gist options
  • Select an option

  • Save adityaiitb/3b9fec00f9186d958a37b907af12b1c2 to your computer and use it in GitHub Desktop.

Select an option

Save adityaiitb/3b9fec00f9186d958a37b907af12b1c2 to your computer and use it in GitHub Desktop.
Extract a Debian package

DEB files are ar archives, which contain three files:

  • debian-binary
  • control.tar.gz
  • data.tar.gz

Unpacking this file is a two step process.

ar vx mypackage.deb
tar -xzvf data.tar.gz

Alternatively, the contents of data.tar.gz can also be extracted in one step.

ar p mypackage.deb data.tar.gz | tar zx

Of late, the file data.tar.gz has been replaced with data.tar.xz

Useful link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment