Friday, December 27, 2024
Google search engine
HomeGuest BlogsExtract deb package on Ubuntu / Debian Linux System

Extract deb package on Ubuntu / Debian Linux System

.tdi_3.td-a-rec{text-align:center}.tdi_3 .td-element-style{z-index:-1}.tdi_3.td-a-rec-img{text-align:left}.tdi_3.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_3.td-a-rec-img{text-align:center}}

deb is a format and software packaging extension for the Linux distribution from Debian family and its derivatives. In this guide, we will explore how to extract a .deb package file. This is relevant to Software developers working on Debian related applications.

Debian applications are packaged as regularĀ arĀ archives. A Debian package generally has three main files:

  • debian-binary: regular text file which stores the version of the deb package format.
  • control.tar.gz: This compressed file contains file md5sums and control directory for the deb package.
  • data.tar.xz: Contains all the installation files.

There are two common ways of unpacking a deb package.

.tdi_2.td-a-rec{text-align:center}.tdi_2 .td-element-style{z-index:-1}.tdi_2.td-a-rec-img{text-align:left}.tdi_2.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_2.td-a-rec-img{text-align:center}}

Using ar command

You can also use the arĀ command withĀ ā€“xĀ parameter. The ar command is provided by binutils package.

sudo apt update
sudo apt install binutils tree -y
wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
ar -x mysql-apt-config_0.8.13-1_all.deb

If you want more verbose output, add theĀ -vĀ argument like this:

$ ar -xv mysql-apt-config_0.8.13-1_all.deb
x - debian-binary
x - control.tar.xz
x - data.tar.xz

Confirm:

$ tree
.
ā”œā”€ā”€ control.tar.xz
ā”œā”€ā”€ data.tar.xz
ā”œā”€ā”€ debian-binary
ā””ā”€ā”€ mysql-apt-config_0.8.13-1_all.deb

0 directories, 4 files

Using dpkg command

If youā€™re running a Debian based system. you can use dpkg command to extract a .deb package. Letā€™s consider an example.

wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
mkdir extrated
dpkg -x mysql-apt-config_0.8.13-1_all.deb extrated

Confirm directory contents:

$ tree extrated/
extrated/
ā””ā”€ā”€ usr
    ā””ā”€ā”€ share
        ā””ā”€ā”€ doc
            ā””ā”€ā”€ mysql-apt-config
                ā”œā”€ā”€ COPYING.gz
                ā”œā”€ā”€ README
                ā”œā”€ā”€ changelog.Debian.gz
                ā””ā”€ā”€ copyright

4 directories, 4 files

There you have it. You have successfully extracted a deb package.

.tdi_4.td-a-rec{text-align:center}.tdi_4 .td-element-style{z-index:-1}.tdi_4.td-a-rec-img{text-align:left}.tdi_4.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_4.td-a-rec-img{text-align:center}}

RELATED ARTICLES

Most Popular

Recent Comments

ź°•ģ„œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
źøˆģ²œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
źµ¬ģ›”ė™ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź°•ģ„œźµ¬ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ģ˜¤ģ‚°ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ģ•ˆģ–‘ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė™ķƒ„ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ģ„œģšøģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶„ė‹¹ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ķ™”ź³”ė™ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź°•ģ„œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź³ ģ–‘ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ķ™”ģ„±ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ģ²œķ˜øė™ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?