DEB-REVERSION(1)
π deb-reversion β bestie's guide to β¨changing a .deb versionβ¨ π
okay so. you have a .deb file. you want it to have a different version number. this is the deb-reversion manual page (it lives in section 1 of the manual, iykyk) and I'm gonna walk you through every single flag like we're texting at 2am. no cap.
πΈ NAME πΈ
deb-reversion β a simple lil script that changes the version of a .deb file π
β¨ SYNOPSIS β¨
deb-reversion [options] .deb-file [log message...]
π¦ DESCRIPTION π¦
So here's the tea: deb-reversion unpacks the .deb file you give it, changes the version number everywhere it needs to change, appends a Debian changelog entry with whatever contents you specified, and then builds you a brand new .deb file with the updated version. slay.
By default, the tool makes a new version number that's suitable for local changes β the new package will be greater than the current one, but lesser than any future, official Debian packages. it's giving "I'm here but I'm not trying to start drama with the real releases". If you pass -v version, you can just specify the version number directly, no guessing. And -c? That one only calculates the new version number and shows it to you β it does not generate a new package. lowkey useful for a vibe check before committing.
heads up bestie: when building a.debfile, you need root privileges so the resulting.debfile has the correct permissions and ownerships. you can get that either by runningdeb-reversionas root, or by running it underfakeroot(1), like this:fakeroot deb-reversion foo.deb.
With -k hook, you can specify a hook script, and it gets run on the unpacked binary packages just before it all gets repacked. If you wanna write changelog entries from inside the hook, use dch -a -- your message. (Or, alternatively, just don't give a changelog entry on the deb-reversion command line and dch will be called automatically. easy.) The hook command must be placed in quotes if it has more than one word, because it's called via sh -c.
π OPTIONS π
-v new-version,--new-version new-versionβ tells it which version number to use for the new version. this gets passed todch(1). π-o old-version,--old-version old-versionβ says which version number to treat as the old version, instead of using the version stored in the.deb's control file. πΈ-c,--calculate-onlyβ only calculate and display the new version number that would be used. does not build a new.debfile. β οΈ cannot be used together with-v. pick a lane bestie.-s string,--string stringβ instead of appending'LOCAL.'as the version string onto the old version number, appendstringinstead. cute.-k hook-command,--hook hook-commandβ a hook command to run after unpacking the old.debfile and modifying the changelog, and before packing up the new.debfile. must be in quotes if it's more than one (shell) word. only one hook command may be specified; if you wanna do more than that, you could specify'bash'as the hook command and you'll be handed a shell to work in. π«Ά-D,--debugβ passes--debugtodpkg-deb(1). π₯-b,--force-bad-versionβ passes--force-bad-versiontodch(1).-h,--helpβ display usage information. the classic. π-V,--versionβ display version information. β
π SEE ALSO π
dch(1), dpkg-deb(1), fakeroot(1)
π DISCLAIMER π
deb-reversion is a tool meant to help porters with modifying packages for other architectures, and to augment deb-repack, which creates modified packages with identical version numbers as the official packages. Chaos will ensue! π With deb-reversion, a proper version number can be selected, which does not obstruct the next official release but can be specifically pinned with APT or held with dpkg.
Please take note that deb-reversion does not come without problems. While it works fine in most cases, it may just not in yours. Especially, please consider that it changes binary packages (only!) and hence can break strict versioned dependencies between binary packages generated from the same source. yeah. read that again. π
You are using this tool at your own risk and I shall not shed a tear if your gerbil goes up in flames, your microwave attacks the stereo, or the angry slamming of your fist spills your coffee into the keyboard, which sets off a chain reaction resulting in a vast amount of money transferred from your account to mine. (iconic behavior tbh, but also: your problem not mine. periodt.)
π AUTHOR π
deb-reversion is Copyright 2004-5 by martin f. krafft <madduck@debian.org> and modifications are Copyright 2006 by Julian Gilbey <jdg@debian.org>.
Permission is granted to copy, distribute and/or modify this document under the terms of the Artistic License: http://www.opensource.org/licenses/artistic-license.php. On Debian systems, the complete text of the Artistic License can be found in /usr/share/common-licenses/Artistic.
This manual page was written by martin f. krafft <madduck@debian.org> and modified by Julian Gilbey <jdg@debian.org>.
π NOTES π
and that's the whole page bestie!! π§ the source line is literally [FIXME: source] and the date on this thing is Feb 13, 2006 β yeah she's an elder but she still ate π
go change some version numbers, drink water, and don't break your dependency graph πβ¨
π¦ where this page comes from
- debian bookworm: devscripts 2.23.4+deb12u2 Β· GPL-2.0-or-later
- debian trixie: devscripts 2.25.15+deb13u1 Β· GPL-2.0-or-later
- epel 10: devscripts 2.25.5-1.el10_1 Β· GPL-2.0-or-later
- epel 9: devscripts 2.25.5-1.el9 Β· GPL-2.0-or-later
- fedora 43: devscripts 2.25.19-2.fc43 Β· GPL-2.0-or-later
- 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
- opensuse-leap 16.0: devscripts 2.22.2-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Artistic-2.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND GPL-3.0-only AND SUSE-Public-Domain AND ISC
- opensuse-leap 16.0: devscripts 2.22.2-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Artistic-2.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND GPL-3.0-only AND SUSE-Public-Domain AND ISC
- opensuse-leap 16.0: devscripts 2.22.2-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Artistic-2.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND GPL-3.0-only AND SUSE-Public-Domain AND ISC
- opensuse-leap 16.0: devscripts 2.22.2-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Artistic-2.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND GPL-3.0-only AND SUSE-Public-Domain AND ISC
- ubuntu jammy: devscripts 2.22.1ubuntu1 Β· GPL-2.0-or-later
- ubuntu jammy: devscripts 2.22.1ubuntu1.2 Β· GPL-2.0-or-later
- ubuntu noble: devscripts 2.23.7 Β· GPL-2.0-or-later
- ubuntu noble: devscripts 2.23.7ubuntu0.2 Β· GPL-2.0-or-later
- ubuntu questing: devscripts 2.25.19ubuntu2
- 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