{
    "mode": "man",
    "parameter": "deb-reversion",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/deb-reversion/1/json",
    "generated": "2026-05-30T05:15:19Z",
    "synopsis": "deb-reversion [options] .deb-file [log message...]",
    "sections": {
        "NAME": {
            "content": "deb-reversion - simple script to change the version of a .deb file\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "deb-reversion [options] .deb-file [log message...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "deb-reversion unpacks the specified .deb file, changes the version number in the relevant\nlocations, appends a Debian changelog entry with the specified contents, and creates a new\n.deb file with the updated version.\n\nBy default, the tool creates a new version number suitable for local changes, such that the\nnew package will be greater than the current one, but lesser than any future, official Debian\npackages. With -v version, the version number can be specified directly. On the other hand,\nthe -c simply calculates the new version number but does not generate a new package.\n\nWhen building a .deb file, root privileges are required in order to have the correct\npermissions and ownerships in the resulting .deb file. This can be achieved either by running\ndeb-reversion as root or running under fakeroot(1), as 'fakeroot deb-reversion foo.deb'.\n\nWith -k hook, a hook script may be specified, which is run on the unpacked binary packages\njust before it is repacked. If you want to write changelog entries from within the hook, use\n'dch -a -- your message'. (Alternatively, do not give a changelog entry on the deb-reversion\ncommand line and dch will be called automatically.) The hook command must be placed in quotes\nif it has more than one word; it is called via sh -c.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-v --new-version",
                    "content": "Specifies the version number to be used for the new version. Passed to dch(1).\n",
                    "flag": "-v",
                    "long": "--new-version"
                },
                {
                    "name": "-o --old-version",
                    "content": "Specifies the version number to be used as the old version instead of the version stored\nin the .deb's control file.\n",
                    "flag": "-o",
                    "long": "--old-version"
                },
                {
                    "name": "-c --calculate-only",
                    "content": "Only calculate and display the new version number which would be used; do not build a new\n.deb file. Cannot be used in conjunction with -v.\n",
                    "flag": "-c",
                    "long": "--calculate-only"
                },
                {
                    "name": "-s --string",
                    "content": "Instead of using 'LOCAL.' as the version string to append to the old version number, use\nstring instead.\n",
                    "flag": "-s",
                    "long": "--string"
                },
                {
                    "name": "-k --hook",
                    "content": "A hook command to run after unpacking the old .deb file and modifying the changelog, and\nbefore packing up the new .deb file. Must be in quotes if it is more than one (shell)\nword. Only one hook command may be specified; if you want to perform more than this, you\ncould specify 'bash' as the hook command, and you will then be given a shell to work in.\n",
                    "flag": "-k",
                    "long": "--hook"
                },
                {
                    "name": "-D --debug",
                    "content": "Pass --debug to dpkg-deb(1).\n",
                    "flag": "-D",
                    "long": "--debug"
                },
                {
                    "name": "-b --force-bad-version",
                    "content": "Pass --force-bad-version to dch(1)\n",
                    "flag": "-b",
                    "long": "--force-bad-version"
                },
                {
                    "name": "-h --help",
                    "content": "Display usage information.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-V --version",
                    "content": "Display version information.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "SEE ALSO": {
            "content": "dch(1), dpkg-deb(1), fakeroot(1)\n",
            "subsections": []
        },
        "DISCLAIMER": {
            "content": "deb-reversion is a tool intended to help porters with modifying packages for other\narchitectures, and to augment deb-repack, which creates modified packages with identical\nversion numbers as the official packages. Chaos will ensue! With deb-reversion, a proper\nversion number can be selected, which does not obstruct the next official release but can be\nspecifically pinned with APT or held with dpkg.\n\nPlease take note that deb-reversion does not come without problems. While it works fine in\nmost cases, it may just not in yours. Especially, please consider that it changes binary\npackages (only!) and hence can break strict versioned dependencies between binary packages\ngenerated from the same source.\n\nYou are using this tool at your own risk and I shall not shed a tear if your gerbil goes up\nin flames, your microwave attacks the stereo, or the angry slamming of your fist spills your\ncoffee into the keyboard, which sets off a chain reaction resulting in a vast amount of money\ntransferred from your account to mine.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "deb-reversion is Copyright 2004-5 by martin f. krafft <madduck@debian.org> and modifications\nare Copyright 2006 by Julian Gilbey <jdg@debian.org>.\n\nPermission is granted to copy, distribute and/or modify this document under the terms of the\nArtistic License: http://www.opensource.org/licenses/artistic-license.php. On Debian systems,\nthe complete text of the Artistic License can be found in\n/usr/share/common-licenses/Artistic.\n\nThis manual page was written by martin f. krafft <madduck@debian.org> and modified by Julian\nGilbey <jdg@debian.org>.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. http://www.opensource.org/licenses/artistic-license.php\n\n\n\n[FIXME: source]                             Feb 13, 2006                            DEB-REVERSION(1)",
            "subsections": []
        }
    },
    "summary": "deb-reversion - simple script to change the version of a .deb file",
    "flags": [
        {
            "flag": "-v",
            "long": "--new-version",
            "arg": null,
            "description": "Specifies the version number to be used for the new version. Passed to dch(1)."
        },
        {
            "flag": "-o",
            "long": "--old-version",
            "arg": null,
            "description": "Specifies the version number to be used as the old version instead of the version stored in the .deb's control file."
        },
        {
            "flag": "-c",
            "long": "--calculate-only",
            "arg": null,
            "description": "Only calculate and display the new version number which would be used; do not build a new .deb file. Cannot be used in conjunction with -v."
        },
        {
            "flag": "-s",
            "long": "--string",
            "arg": null,
            "description": "Instead of using 'LOCAL.' as the version string to append to the old version number, use string instead."
        },
        {
            "flag": "-k",
            "long": "--hook",
            "arg": null,
            "description": "A hook command to run after unpacking the old .deb file and modifying the changelog, and before packing up the new .deb file. Must be in quotes if it is more than one (shell) word. Only one hook command may be specified; if you want to perform more than this, you could specify 'bash' as the hook command, and you will then be given a shell to work in."
        },
        {
            "flag": "-D",
            "long": "--debug",
            "arg": null,
            "description": "Pass --debug to dpkg-deb(1)."
        },
        {
            "flag": "-b",
            "long": "--force-bad-version",
            "arg": null,
            "description": "Pass --force-bad-version to dch(1)"
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display usage information."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Display version information."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "dch",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dch/1/json"
        },
        {
            "name": "dpkg-deb",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dpkg-deb/1/json"
        },
        {
            "name": "fakeroot",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/fakeroot/1/json"
        }
    ]
}