Linux Commands Examples

A great documentation place for Linux commands


compress files and fix symlinks in package build directories


dh_compress [debhelper options] [-Xitem] [-A] [file ...]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


dh $@
dh_compress -XREADME
# Add here commands to install the package into debian/dynamips-community.


dh_compress is a debhelper program that is responsible for compressing the files in package build directories, and makes sure that any symlinks that pointed to the files before they were compressed are updated to point to the new files.

By default, dh_compress compresses files that Debian policy mandates should be compressed, namely all files in usr/share/info, usr/share/man, files in usr/share/doc that are larger than 4k in size, (except the copyright file, .html and other web files, image files, and files that appear to be already compressed based on their extensions), and all changelog files. Plus PCF fonts underneath usr/share/fonts/X11/


-Xitem, --exclude=item

Exclude files that contain item anywhere in their filename from being compressed. For example, -X.tiff will exclude TIFF files from compression. You may use this option multiple times to build up a list of things to exclude.

-A, --all

Compress all files specified by command line parameters in ALL packages acted on.

file ...

Add these files to the list of files to compress.

conforms to

Debian policy, version 3.0



These files are deprecated.

If this file exists, the default files are not compressed. Instead, the file is ran as a shell script, and all filenames that the shell script outputs will be compressed. The shell script will be run from inside the package build directory. Note though that using -X is a much better idea in general; you should only use a debian/package.compress file if you really need to.

see also


This program is a part of debhelper.


Joey Hess <joeyh[:at:]debian[:dot:]org>

How can this site be more helpful to YOU ?

give  feedback