N
The Daily Insight

How do I extract a deb file?

Author

John Peck

Updated on April 04, 2026

  1. Step 1 – Download .deb package. Use the apt-get command/apt command as follows to download a file named nginx*.deb: $ apt download nginx. $ aptitude download nginx. $ apt-get download nginx.
  2. Step 2 – Extract . deb package using ar command. The syntax is: ar x {file.deb} Install ar command.

How do I unzip a .deb file in Ubuntu?

Install/Uninstall . deb files

  1. To install a . deb file, simply Right click on the .
  2. Alternatively, you can also install a .deb file by opening a terminal and typing: sudo dpkg -i package_file.deb.
  3. To uninstall a .deb file, remove it using Adept, or type: sudo apt-get remove package_name.

How do I modify a Debian package?

3 Answers. The primary command to manipulate deb packages is dpkg-deb . To unpack the package, create an empty directory and switch to it, then run dpkg-deb to extract its control information and the package files. Use dpkg-deb -b to rebuild the package.

How do I list files in a Debian package?

dpkg -c (or –contents ) lists the contents of a . deb package file (It is a front-end to dpkg-deb .) To work directly with package names rather than package files, you can use apt-file . (You may need to install the apt-file package first.)

How do I show package contents in Ubuntu?

Go to

  1. Go to the Search package directories session;
  2. Insert your package name in the Keyword field and select Only show exact matches;
  3. Select your distribution and click in the Search button.
  4. Select the desirable package in the next screen;

How do I find packages in Debian?

Search for Available Packages Using the aptitude Command You can also search for a package using the aptitude Ncurses user interface. Type ‘aptitude’ in the terminal and the following interface will be displayed in the window. To search for a package, press ‘/’ and then type the package name into the search bar.

How extract XZ file in Linux?

The syntax is:

  1. Install xz using the dnf install xz on a CentOS/RHEL/Fedora Linux.
  2. Debian/Ubuntu Linux users try apt install xz-utils command.
  3. Extract tar. xz using the tar -xf backup. tar. xz command.
  4. To decompress filename. tar. xz file run: xz -d -v filename. tar. xz.

What apps can open deb files?

Programs that open DEB files

  • File Viewer Plus.
  • 7-Zip.
  • IZArc.

What program will open a deb file?

How to Open a DEB File. Open DEB files with any popular compression/decompression program, the free 7-Zip tool being one example. Any of these types of programs will decompress (extract) the contents of a DEB file and some create DEB compressed files.

How do I repack a deb file?

Unpack, modify and repack deb files

  1. Copy the deb file to a directory.
  2. Create the directory structure $ mkdir -p newpack oldpack/DEBIAN.
  3. Extract the filesystem tree $ dpkg-deb -x file.deb oldpack/
  4. Extract the control information files $ dpkg-deb -e file.deb oldpack/DEBIAN.
  5. Modify something if you want.

How do I extract a deb package in Linux?

If you’re running a Debian based system. you can use dpkg command to extract a .deb package. Let’s consider an example. There you have it. You have successfully extracted a deb package. that cup of coffee is what keeps us going!

How do I extract the control section from a Debian package?

Please use dpkg or apt-get to install packages. To extract the control section from a debian package, use the dpkg command with the -e option. This will extract the control files for a package into the specified directory: What are preinst, postinst, prerm and postrm files?

What are preinst and postinst files in Debian?

The preinst, postinst, prerm, and postrm files are scripts that will automatically execute before or after a package is installed or removed. These scripts are part of the control section of a Debian package.

What is a deb file?

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.