DEBDIFF(1)
π DEBDIFF(1) π
okay so bestie, welcome to debdiff, from the General Commands Manual β it's the little tool that compares file lists in two Debian packages, and honestly? she eats. π
β¨ NAME β¨
debdiff β compare file lists in two Debian packages
πΈ SYNOPSIS πΈ
debdiff [options]
debdiff [options] ... deb1 deb2
debdiff [options] ... changes1 changes2
debdiff [options] ... --from deb1a deb1b ... --to deb2a deb2b ...
debdiff [options] ... dsc1 dsc2
π¦ DESCRIPTION π¦
okay so here's the vibe π
β debdiff takes the names of two Debian package files (.debs or .udebs) on the command line and compares their contents. and when I say contents I mean considering only the files in the main package, not the maintenance scripts, no cap.
It shows you which files have been introduced and which have been removed between the two package files, and that's literally why it's useful β for spotting files that may have been inadvertently lost between revisions of the package. π the way a file can just vanish between uploads. it also checks the file owners and permissions, and compares the control files of the two packages using the wdiff program. obsessed.
If you want a deeper comparison of two Debian package files, you can use the diffoscope tool instead. β¨
If no arguments are given, debdiff tries to compare the content of the current source directory with the last version of the package. lowkey iconic behaviour.
debdiff can also handle changes between groups of .deb files, in two ways:
- The first is to specify two
.changesfiles. In this case, the.debfiles listed in the.changesfile will be compared, by taking the contents of all of the listed.debfiles together. (The.debfiles listed are assumed to be in the same directory as the.changesfile.) - The second way is to list the
.debfiles of interest specifically using the--from ... --tosyntax.
Both of these help if a package is broken up into smaller packages and one wishes to ensure that nothing is lost in the interim. π«Ά
debdiff examines the devscripts configuration files as described below. Command line options override the configuration file settings, though. periodt.
If debdiff is passed two source packages (.dsc files) it will compare the contents of the source packages. If the source packages differ only in Debian revision number (that is, the .orig.tar.gz files are the same in the two .dsc files), then interdiff(1) will be used to compare the two patch files if this program is available on the system β otherwise a diff will be performed between the two source trees. π
π OPTIONS π
--dirs,-dβ the default mode of operation is to ignore directory names which appear in the file list, but bestie, they too will be considered if this option is given. β¨--nodirsβ ignore directory names which appear in the file list. This is the default, and it can be used to override a configuration file setting.--move FROM TO,-m FROM TOβ it sometimes occurs that various files or directories are moved around between revisions. this can be handled using this option. There are two arguments: the first giving the location of the directory or file in the first package, and the second in the second. Any files in the first listing whose names begin with the first argument are treated as having that substituted for the second argument when the file lists are compared. Any number of--movearguments may be given; they are processed in the order in which they appear. This only affects comparing binary packages, not source packages. π--move-regex FROM TOβ same as--move, except thatFROMis treated as a regular expression and the perl substitution commands/^FROM/TO/is applied to the files. In particular,TOcan make use of backreferences such as$1.--nocontrolβdebdiffwill usually compare the respective control files of the packages usingwdiff(1). This option suppresses this part of the processing.--controlβ compare the respective control files; this is the default, and it can be used to override a configuration file setting.--controlfiles FILE[,FILE ...]β specify which control files to compare; by default this is justcontrol, but could includepostinst,configand so on. Files will only be compared if they are present in both.debsbeing compared. The special valueALLcompares all control files present in both packages, except formd5sums. This option can be used to override a configuration file setting.--wdiff-source-controlβ when processing source packages, compare control files usingwdiff. Equivalent to the--controloption for binary packages.--no-wdiff-source-controlβ do not compare control files in source packages usingwdiff. This is the default.--wp,--wl,--wtβ pass a-p,-lor-toption towdiffrespectively. (This yields the wholewdiffoutput rather than just the lines with any changes.) π--show-movedβ if multiple.debfiles are specified on the command line, either using.changesfiles or the--from/--tosyntax, then this option will also show which files (if any) have moved between packages. (The package names are simply determined from the names of the.debfiles.) π--noshow-movedβ the default behaviour; can be used to override a configuration file setting.--renamed FROM TOβ if--show-movedis being used and a package has been renamed in the process, this command instructsdebdiffto treat the package in the first list calledFROMas if it were calledTO. Multiple uses of this option are permitted.--exclude PATTERNβ exclude files whose basenames matchPATTERN. Multiple uses of this option are permitted. Note that this option is passed on todiffand has the same behaviour, so only the basename of the file is considered: in particular,--exclude='*.patch'will work, but--exclude='debian/patches/*'will have no practical effect. π--no-checkβ do no check of signatures and checksums before unpacking the source archives. This is intended to be used when the caller has guaranteed the provenance of the source package β for example when a package manager downloads the source package from a repository with metadata indices that contain signatures and checksums that get rotated and updated, so that it is guaranteed to be already validated before we extract the source package.
Supported since 2.25.27.
--diffstatβ include the result ofdiffstatbefore the generated diff.--no-diffstatβ the default behaviour; can be used to override a configuration file setting.--auto-ver-sortβ when comparing source packages, do so in version order.--no-auto-ver-sortβ compare source packages in the order they were passed on the command-line, even if that means comparing a package with a higher version against one with a lower version. This is the default behaviour.--unpack-tarballsβ when comparing source packages, also unpack tarballs found in the top level source directory to compare their contents along with the other files. This is the default behaviour.--no-unpack-tarballsβ do not unpack tarballs inside source packages.--apply-patchesβ if the old and/or new package is in 3.0 (quilt) format, apply the quilt patches (and remove.pc/) before comparison.--no-apply-patches,--noapply-patchesβ if the old and/or new package is in 3.0 (quilt) format, do not apply the quilt patches before comparison. This is the default behaviour.--no-conf,--noconfβ do not read any configuration files. β οΈ This can only be used as the first option given on the command-line.--debs-dir directoryβ look for the.dscfiles indirectoryinstead of the parent of the source directory. This should either be an absolute path or relative to the top of the source directory.--help,-hβ show a summary of options.--version,-vβ show version and copyright information.--quiet,-qβ be quiet if no differences were found. π€«--ignore-space,-wβ ignore whitespace in diffs.
π CONFIGURATION VARIABLES π
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in that order to set configuration variables. Command line options can be used to override configuration file settings. Environment variable settings are ignored for this purpose. The currently recognised variables are:
DEBDIFF_DIRSβ if this is set toyes, then it is the same as the--dirscommand line parameter being used.DEBDIFF_CONTROLβ if this is set tono, then it is the same as the--nocontrolcommand line parameter being used. The default isyes.DEBDIFF_CONTROLFILESβ which control files to compare, corresponding to the--controlfilescommand line option. The default iscontrol.DEBDIFF_SHOW_MOVEDβ if this is set toyes, then it is the same as the--show-movedcommand line parameter being used.DEBDIFF_WDIFF_OPTβ this option will be passed towdiff; it should be one of-p,-lor-t.DEBDIFF_CHECK_SOURCEβ if this is set tono, then it is the same as the--no-checkcommand line parameter being used.
Supported since 2.25.27.
DEBDIFF_SHOW_DIFFSTATβ if this is set toyes, then it is the same as the--diffstatcommand line parameter being used.DEBDIFF_WDIFF_SOURCE_CONTROLβ if this is set toyes, then it is the same as the--wdiff-source-controlcommand line parameter being used.DEBDIFF_AUTO_VER_SORTβ if this is set toyes, then it is the same as the--auto-ver-sortcommand line parameter being used.DEBDIFF_UNPACK_TARBALLSβ if this is set tono, then it is the same as the--no-unpack-tarballscommand line parameter being used.DEBDIFF_APPLY_PATCHESβ if this is set toyes, then it is the same as the--apply-patchescommand line parameter being used. The default isno.DEBRELEASE_DEBS_DIRβ this specifies the directory in which to look for the.dscand files, and is either an absolute path or relative to the top of the source tree. This corresponds to the--debs-dircommand line option. This directive could be used, for example, if you always usepbuilderorsvn-buildpackageto build your packages. Note that it also affectsdebrelease(1)in the same way, hence the strange name of the option. π§
πͺ EXIT VALUES (bestie, this is how you know what happened)
Okay so like, here's the vibe check on what debdiff hands back when it's done doing its thing:
0β no differences reported. Everything matched, it's giving peaceful, it's giving harmony, nothing to see here π1β differences WERE reported. Not an error! It literally just means "yeah bestie, these two are not the same" π255β some fatal error happened π something went genuinely wrong, this is not a drill
Normally that's the whole story:0for no diffs,1for diffs, and255when things go catastrophically sideways. Periodt. π₯
π SEE ALSO (your little reading list, go off)
Like, if you loved this, you're gonna be obsessed with these:
π AUTHOR (giving credit where credit is SO due)
Okay so the lore is actually iconic. debdiff started life as a shell script written by Yann Dirson <dirson@debian.org>, and then Julian Gilbey <jdg@debian.org> rewrote the whole thing in Perl and stacked it with many more features. A glow-up of epic proportions, no cap β¨
And the legal bit, because we respect it: the software may be freely redistributed under the terms and conditions of the GNU General Public License, version 2. π«Ά
and that's the whole page bestie!! π this manual page came from Debian Utilities β section 1, DEBDIFF(1), dated Debian, and it's all yours now. go diff some packages, you absolute main character πππ
π¦ where this page comes from
- fedora 43: devscripts 2.25.33-1.fc43 Β· GPL-2.0-or-later
- fedora 44: devscripts 2.26.5-1.fc44 Β· GPL-2.0-or-later
- ubuntu resolute: devscripts 2.26.7 Β· GPL-2.0-or-later
- ubuntu stonking: devscripts 2.26.11ubuntu1 Β· 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