DH_COMPRESS(1)
π DH_COMPRESS(1) π
okay bestie, welcome to the dh_compress page from the Debhelper manual β yes it's a real manpage, yes it's giving "make my package smol" energy, and yes I'm gonna walk you through every single line of it. no skimming. we're doing this properly. π«Ά
β¨ NAME β¨
dh_compress β compress files and fix symlinks in package build directories πΈ
β¨ SYNOPSIS β¨
dh_compress [debhelper options] [-Xitem] [-A] [file ...]
that's it. that's the whole vibe. π
β¨ DESCRIPTION β¨
so dh_compress is a debhelper program and its whole job β its main character moment, fr β is compressing the files sitting in your package build directories. and THEN, because it's thoughtful like that, it makes sure that any symlinks that used to point at those files before they got squished are updated so they point at the new compressed versions instead. iconic behaviour, no cap. π¦
by default, dh_compress compresses the files that Debian policy mandates should be compressed, which is:
- everything in
usr/share/infoπ - everything in
usr/share/manπ - files in
usr/share/docthat are larger than4kin size π¦
β¦except for all of these, which get a pass:
- the
copyrightfile .htmland other web files πΈοΈ- image files πΌοΈ
- files that appear to be already compressed based on their extensions (girl, we can see you're a
.gz, chill) π
and also all changelog files get compressed. plus PCF fonts underneath usr/share/fonts/X11/ π
β¨ FILES β¨
π debian/package.compress
β οΈ bestie. these files are deprecated. like, deprecated 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 get compressed. the shell script runs from inside the package build directory. but note though β using -X is a much better idea in general; you should only use a debian/package.compress file if you really, truly need to. π₯Ί
β¨ OPTIONS β¨
-Xitem,--exclude=itemβ excludes any files that contain item anywhere in their filename from being compressed. for example,-X.tiffwill exclude TIFF files from compression. you can use this option multiple times to build up a whole list of things to exclude β stack 'em like bracelets. π-A,--allβ compress all files specified by command line parameters in ALL packages acted on. all of them. every single one. periodt. πfile ...β add these files to the list of files to compress. just hand 'em over. π«Ά
β¨ CONFORMS TO β¨
Debian policy, version 3.0 β
β¨ SEE ALSO β¨
debhelper(7)π
this program is a part of debhelper π
β¨ AUTHOR β¨
Joey Hess <joeyh@debian.org> π
and that's the whole page, bestie β every flag, every path, every deprecated warning, all accounted for. this was dh_compress from the Debhelper manual, version 14.5ubuntu1, dated 2026-09-21. go compress something. responsibly. πβ¨π
π¦ where this page comes from
- ubuntu stonking: debhelper 14.5ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms