dpkg-deb is a command line tool in Linux used to manipulate Debian package files (which have a .deb file extension). It is part of the dpkg package management system, which is the default package management system for Debian and its derivatives, such as Ubuntu.
The dpkg-deb command can be used to perform a variety of tasks related to Debian package files, including:
- Building Debian package files from a set of files and directories.
- Extracting the contents of a Debian package file to a directory.
- Inspecting the contents and metadata of a Debian package file.
- Installing and uninstalling Debian package files.
dpkg-deb Command Examples
1. Display information about a package:
# dpkg-deb --info path/to/file.deb
2. Display the package’s name and version on one line:
# dpkg-deb --show path/to/file.deb
3. List the package’s contents:
# dpkg-deb --contents path/to/file.deb
4. Extract package’s contents into a directory:
# dpkg-deb --extract path/to/file.deb path/to/directory
5. Create a package from a specified directory:
# dpkg-deb --build path/to/directory