{
    "content": [
        {
            "type": "text",
            "text": "# deb-prerm(5) (man)\n\n**Summary:** deb-prerm - package pre-removal maintainer script\n\n## See Also\n\n- dpkg(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (1 lines) — 1 subsections\n  - DEBIAN/prerm (1 lines)\n- **DESCRIPTION** (23 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\ndeb-prerm - package pre-removal maintainer script\n\n### SYNOPSIS\n\n#### DEBIAN/prerm\n\n### DESCRIPTION\n\nA package can perform several pre-removal actions via maintainer scripts, by including an\nexecutable prerm file in its control archive (i.e. DEBIAN/prerm during package creation).\n\nThe script can be called in the following ways:\n\nprerm remove\nBefore the package is removed.\n\nold-prerm upgrade new-version\nBefore an upgrade.\n\nnew-prerm failed-upgrade old-version new-version\nIf the above upgrade fails.\n\nThe new-version is passed only since dpkg 1.18.5.\n\nprerm deconfigure in-favour new-package new-version\n    [ removing old-package old-version ]\nBefore package is deconfigured while dependency is replaced due to conflict.\n\nprerm remove in-favour new-package new-version\nBefore the package is replaced due to conflict.\n\n### SEE ALSO\n\ndpkg(1).\n\n\n\n1.21.1                                       2025-09-09                                 deb-prerm(5)\n\n"
        }
    ],
    "structuredContent": {
        "command": "deb-prerm",
        "section": "5",
        "mode": "man",
        "summary": "deb-prerm - package pre-removal maintainer script",
        "synopsis": "",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "dpkg",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dpkg/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "DEBIAN/prerm",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}