Use dpkg to install and remove packages from your system.
You can also invoke dpkg-deb by calling dpkg with whatever options you want to pass to dpkg-deb. dpkg will spot that you wanted dpkg-deb and run it for you.
For most commands taking an input archive argument, the archive can be read from standard input if the archive name is given as a single minus character («-»); otherwise lack of support will be documented in their respective command description.
Unless you specify --nocheck, dpkg-deb will read DEBIAN/control and parse it. It will check the file for syntax errors and other problems, and display the name of the binary package being built. dpkg-deb will also check the permissions of the maintainer scripts and other files found in the DEBIAN control information directory.
If no archive is specified then dpkg-deb will write the package into the file binary-directory.deb.
If the archive to be created already exists it will be overwritten.
If the second argument is a directory then dpkg-deb will write to the file directory/package_version_arch.deb. When a target directory is specified, rather than a file, the --nocheck option may not be used (since dpkg-deb needs to read and parse the package control file to determine which filename to use).
If no control-file-names are specified then it will print a summary of the contents of the package as well as its control file.
If any control-file-names are specified then dpkg-deb will print them in the order they were specified; if any of the components weren't present it will print an error message to stderr about each one and exit with status 2.
If no control-field-names are specified then it will print the whole control file.
If any are specified then dpkg-deb will print their contents, in the order in which they appear in the control file. If more than one control-field-name is specified then dpkg-deb will precede each with its field name (and a colon and space).
No errors are reported for fields requested but not found.
Note that extracting a package to the root directory will not result in a correct installation! Use dpkg to install packages.
directory (but not its parents) will be created if necessary, and its permissions modified to match the contents of the package.
The target directory (but not its parents) will be created if necessary.
The input archive is not (currently) processed sequentially, so reading it from standard input («-») is not supported.
If no directory is specified then a subdirectory DEBIAN in the current directory is used.
The target directory (but not its parents) will be created if necessary.
The string may reference any status field using the "${field-name}" form, a list of the valid fields can be easily produced using -I on the same package. A complete explanation of the formatting options (including escape sequences and field tabbing) can be found in the explanation of the --showformat option in dpkg-query(1).
The default for this field is "${Package}\t${Version}\n".
Note: This option can be useful for rootless builds (see rootless-builds.txt), but should not be used when the entries have an owner or group that is not root. Support for these will be added later in the form of a meta manifest.
The old archive format is less easily parsed by non-Debian tools and is now obsolete; its only use is when building packages to be parsed by versions of dpkg older than 0.93.76 (September 1995), which was released as i386 a.out only.
There is no authentication on .deb files; in fact, there isn't even a straightforward checksum. (Higher level tools like APT support authenticating .deb packages retrieved from a given repository, and most packages nowadays provide an md5sum control file generated by debian/rules. Though this is not directly supported by the lower level tools.)