{
    "mode": "man",
    "parameter": "mandb",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/mandb/8/json",
    "generated": "2026-06-10T16:17:23Z",
    "synopsis": "mandb [-dqsucpt?V] [-C file] [manpath]\nmandb [-dqsut] [-C file] -f filename ...",
    "sections": {
        "NAME": {
            "content": "mandb - create or update the manual page index caches\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "mandb [-dqsucpt?V] [-C file] [manpath]\nmandb [-dqsut] [-C file] -f filename ...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "mandb is used to initialise or manually update index database caches.  The caches contain in‐\nformation relevant to the current state of the manual page system and the information  stored\nwithin them is used by the man-db utilities to enhance their speed and functionality.\n\nWhen  creating  or  updating an index, mandb will warn of bad ROFF .so requests, bogus manual\npage filenames and manual pages from which the whatis cannot be parsed.\n\nSupplying mandb with an optional colon-delimited path will override the internal system  man‐\nual  page hierarchy search path, determined from information found within the man-db configu‐\nration file.\n",
            "subsections": []
        },
        "DATABASE CACHES": {
            "content": "mandb can be compiled with support for any one of the following database types.\n\n\nName          Async   Filename\n──────────────────────────────────────\nBerkeley db   Yes     index.bt\nGNU gdbm      Yes     index.db\nUNIX ndbm     No      index.(dir|pag)\n\nThose database types that support asynchronous updates provide enhanced speed at the cost  of\npossible  corruption  in the event of unusual termination.  In an unusual case where this has\noccurred, it may be necessary to rerun mandb with the -c option to  re-create  the  databases\nfrom scratch.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-d --debug",
                    "content": "Print debugging information.\n",
                    "flag": "-d",
                    "long": "--debug"
                },
                {
                    "name": "-q --quiet",
                    "content": "Produce no warnings.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-s --no-straycats",
                    "content": "Do  not  spend time looking for or adding information to the databases regarding stray\ncats.\n",
                    "flag": "-s",
                    "long": "--no-straycats"
                },
                {
                    "name": "-p --no-purge",
                    "content": "Do not spend time checking for deleted manual pages and purging them  from  the  data‐\nbases.\n",
                    "flag": "-p",
                    "long": "--no-purge"
                },
                {
                    "name": "-c --create",
                    "content": "By  default, mandb will try to update any previously created databases.  If a database\ndoes not exist, it will create it.  This option forces mandb to delete previous  data‐\nbases  and re-create them from scratch, and implies --no-purge.  This may be necessary\nif a database becomes corrupt or if a new database storage scheme is introduced in the\nfuture.\n",
                    "flag": "-c",
                    "long": "--create"
                },
                {
                    "name": "-u --user-db",
                    "content": "Create  user  databases  only,  even with write permissions necessary to create system\ndatabases.\n",
                    "flag": "-u",
                    "long": "--user-db"
                },
                {
                    "name": "-t --test",
                    "content": "Perform correctness checks on manual pages in the hierarchy search  path.   With  this\noption, mandb will not alter existing databases.\n",
                    "flag": "-t",
                    "long": "--test"
                },
                {
                    "name": "-f --filename",
                    "content": "Update  only  the entries for the given filename.  This option is not for general use;\nit is used internally by man when it has been compiled with the MANDBUPDATES  option\nand finds that a page is out of date.  It implies -p and disables -c and -s.\n",
                    "flag": "-f",
                    "long": "--filename"
                },
                {
                    "name": "-C --config-file=",
                    "content": "Use this user configuration file rather than the default of ~/.manpath.\n\n-?, --help\nShow the usage message, then exit.\n",
                    "flag": "-C"
                },
                {
                    "name": "--usage",
                    "content": "Print a short usage message and exit.\n",
                    "long": "--usage"
                },
                {
                    "name": "-V --version",
                    "content": "Show the version, then exit.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "0      Successful program execution.\n\n1      Usage, syntax, or configuration file error.\n\n2      Operational error.\n\n3      A child process failed.\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "The following warning messages can be emitted during database building.\n",
            "subsections": [
                {
                    "name": "<filename>: whatis parse for page(sec) failed",
                    "content": "An  attempt  to extract whatis line(s) from the given <filename> failed.  This is usu‐\nally due to a poorly written manual page, but if many such messages are emitted it  is\nlikely  that the system contains non-standard manual pages which are incompatible with\nthe man-db whatis parser.  See the WHATIS PARSING section in lexgrog(1) for  more  in‐\nformation.\n"
                },
                {
                    "name": "<filename>: is a dangling symlink",
                    "content": "<filename>  does  not exist but is referenced by a symbolic link.  Further diagnostics\nare usually emitted to identify the <filename> of the offending link.\n"
                },
                {
                    "name": "<filename>: bad symlink or ROFF `.so' request",
                    "content": "<filename> is either a symbolic link to, or contains a ROFF include request to, a  non\nexistent file.\n"
                },
                {
                    "name": "<filename>: ignoring bogus filename",
                    "content": "The <filename> may or may not be a valid manual page but its name is invalid.  This is\nusually due to a manual page with sectional extension <x> being  put  in  manual  page\nsection <y>.\n\n<filenamemask>: competing extensions\nThe  wildcard  <filenamemask> is not unique.  This is usually caused by the existence\nof both a compressed and uncompressed version of the same manual page.   All  but  the\nmost recent are ignored.\n"
                }
            ]
        },
        "FILES": {
            "content": "/etc/manpath.config\nman-db configuration file.\n\n/var/cache/man/index.(bt|db|dir|pag)\nAn FHS compliant global index database cache.\n\nOlder locations for the database cache included:\n\n/usr/man/index.(bt|db|dir|pag)\nA traditional global index database cache.\n\n/var/catman/index.(bt|db|dir|pag)\nAn alternate or FSSTND compliant global index database cache.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "lexgrog(1), man(1), manpath(5), catman(8)\n\nThe WHATIS PARSING section formerly in this manual page is now part of lexgrog(1).\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Wilf. (G.Wilford@ee.surrey.ac.uk).\nFabrizio Polacco (fpolacco@debian.org).\nColin Watson (cjwatson@debian.org).\n",
            "subsections": []
        },
        "BUGS": {
            "content": "https://gitlab.com/cjwatson/man-db/-/issues\nhttps://savannah.nongnu.org/bugs/?group=man-db\n\n\n\n2.10.2                                       2022-03-17                                     MANDB(8)",
            "subsections": []
        }
    },
    "summary": "mandb - create or update the manual page index caches",
    "flags": [
        {
            "flag": "-d",
            "long": "--debug",
            "arg": null,
            "description": "Print debugging information."
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Produce no warnings."
        },
        {
            "flag": "-s",
            "long": "--no-straycats",
            "arg": null,
            "description": "Do not spend time looking for or adding information to the databases regarding stray cats."
        },
        {
            "flag": "-p",
            "long": "--no-purge",
            "arg": null,
            "description": "Do not spend time checking for deleted manual pages and purging them from the data‐ bases."
        },
        {
            "flag": "-c",
            "long": "--create",
            "arg": null,
            "description": "By default, mandb will try to update any previously created databases. If a database does not exist, it will create it. This option forces mandb to delete previous data‐ bases and re-create them from scratch, and implies --no-purge. This may be necessary if a database becomes corrupt or if a new database storage scheme is introduced in the future."
        },
        {
            "flag": "-u",
            "long": "--user-db",
            "arg": null,
            "description": "Create user databases only, even with write permissions necessary to create system databases."
        },
        {
            "flag": "-t",
            "long": "--test",
            "arg": null,
            "description": "Perform correctness checks on manual pages in the hierarchy search path. With this option, mandb will not alter existing databases."
        },
        {
            "flag": "-f",
            "long": "--filename",
            "arg": null,
            "description": "Update only the entries for the given filename. This option is not for general use; it is used internally by man when it has been compiled with the MANDBUPDATES option and finds that a page is out of date. It implies -p and disables -c and -s."
        },
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": "Use this user configuration file rather than the default of ~/.manpath. -?, --help Show the usage message, then exit."
        },
        {
            "flag": "",
            "long": "--usage",
            "arg": null,
            "description": "Print a short usage message and exit."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Show the version, then exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "lexgrog",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lexgrog/1/json"
        },
        {
            "name": "man",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/man/1/json"
        },
        {
            "name": "manpath",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/manpath/5/json"
        },
        {
            "name": "catman",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/catman/8/json"
        },
        {
            "name": "lexgrog",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lexgrog/1/json"
        }
    ]
}