{
    "mode": "man",
    "parameter": "DELUSER",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/DELUSER/8/json",
    "generated": "2026-09-24T20:55:47Z",
    "synopsis": "deluser [--backup] [--backup-suffix str] [--backup-to dir] [--conf file] [--debug]\n[--remove-all-files] [--remove-home] [--quiet] [--verbose] [--stdoutmsglevel prio]\n[--stderrmsglevel prio] [--logmsglevel prio] user\ndeluser [--system] [--backup] [--backup-suffix str] [--backup-to dir] [--conf file] [--debug]\n[--remove-all-files] [--remove-home] [--quiet] [--verbose] [--stdoutmsglevel prio]\n[--stderrmsglevel prio] [--logmsglevel prio] user\ndeluser --group [--conf file] [--debug] [--only-if-empty] [--quiet] [--verbose]\n[--stdoutmsglevel prio] [--stderrmsglevel prio] [--logmsglevel prio] group\ndelgroup [--system] [--conf file] [--debug] [--only-if-empty] [--quiet] [--verbose]\n[--stdoutmsglevel prio] [--stderrmsglevel prio] [--logmsglevel prio] group\ndeluser [--conf file] [--debug] [--quiet] [--verbose] [--stdoutmsglevel prio]\n[--stderrmsglevel prio] [--logmsglevel prio] user group",
    "sections": {
        "NAME": {
            "content": "deluser, delgroup - remove a user or group from the system\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "deluser [--backup] [--backup-suffix str] [--backup-to dir] [--conf file] [--debug]\n[--remove-all-files] [--remove-home] [--quiet] [--verbose] [--stdoutmsglevel prio]\n[--stderrmsglevel prio] [--logmsglevel prio] user\n\ndeluser [--system] [--backup] [--backup-suffix str] [--backup-to dir] [--conf file] [--debug]\n[--remove-all-files] [--remove-home] [--quiet] [--verbose] [--stdoutmsglevel prio]\n[--stderrmsglevel prio] [--logmsglevel prio] user\n\ndeluser --group [--conf file] [--debug] [--only-if-empty] [--quiet] [--verbose]\n[--stdoutmsglevel prio] [--stderrmsglevel prio] [--logmsglevel prio] group\ndelgroup [--system] [--conf file] [--debug] [--only-if-empty] [--quiet] [--verbose]\n[--stdoutmsglevel prio] [--stderrmsglevel prio] [--logmsglevel prio] group\n\ndeluser [--conf file] [--debug] [--quiet] [--verbose] [--stdoutmsglevel prio]\n[--stderrmsglevel prio] [--logmsglevel prio] user group\n",
            "subsections": [
                {
                    "name": "deluser --help",
                    "content": ""
                },
                {
                    "name": "deluser --version",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "deluser  and  delgroup  remove users and groups from the system according to command line op‐\ntions and configuration information in /etc/deluser.conf and /etc/adduser.conf.\n\nThey are friendlier front ends to the userdel and groupdel programs, removing the home direc‐\ntory as option or even all files on the system owned by the user to  be  removed,  running  a\ncustom script, and other features.\n\nFor a full list and explanations of all options, see the OPTIONS section.\n\ndeluser and delgroup can be run in one of three modes:\n\n",
            "subsections": [
                {
                    "name": "Remove a user",
                    "content": "If  called with one non-option argument and without the --group option, deluser will remove a\nnon-system user.\n\nBy default, deluser will remove the user without removing the home directory, the mail  spool\nor  any  other  files  on the system owned by the user.  Removing the home directory and mail\nspool can be achieved using the --remove-home option.\n\nThe  --remove-all-files option removes all files on the system owned by the user.  Note  that\nif  you  activate both options --remove-home will have no additional effect because all files\nincluding the home directory and mail spool are already covered by the --remove-all-files op‐\ntion.\n\nIf you want to backup all files before deleting them you can  activate  the  --backup  option\nwhich will create a file username.tar(.gz|.bz2) in the directory specified by the --backup-to\noption.\n\nBy default, the backup archive is compressed with gzip(1).  To change this, the --backup-suf‐\nfix option can be set to any suffix supported by tar --auto-compress (e.g. .gz, .bz2, .xz).\n\ndeluser will refuse to remove the root account.\n\nIf  the  --system  option is given on the command line, the delete operation is actually exe‐\ncuted only if the user is a system user.  This avoids accidentally deleting non-system users.\nAdditionally, if the user does not exist, no error value is returned.  Debian  package  main‐\ntainer  scripts  may  use  this flag to remove system users or groups while ignoring the case\nwhere the removal already occurred.\n\n"
                },
                {
                    "name": "Remove a group",
                    "content": "If deluser is called with the --group  option, or delgroup is called, a  group  will  be  re‐\nmoved.    The  primary  group  of  an  existing  user  cannot  be  removed.   If  the  option\n--only-if-empty is given, the group won't be removed if it has any members left.\n\nThe --system option adds the same functionality as for users, respectively.\n\n"
                },
                {
                    "name": "Remove a user from a specific group",
                    "content": "If called with two non-option arguments, deluser will remove a user from a specific group.\n\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "Different modes of deluser allow different options.  If no valid modes are listed for  a  op‐\ntion, it is accepted in all modes.\n\nShort  versions for certain options may exist for historical reasons.  They are going to stay\nsupported, but are removed from the documentation.  Users are advised to migrate to the  long\nversion of options.\n",
            "subsections": [
                {
                    "name": "--backup",
                    "content": "Backup  all  files  contained  in  the userhome and the mailspool file to a file named\nusername.tar.bz2 or username.tar.gz.  Valid Modes: deluser, deluser --system,\n\n--backup-suffix str\nSelect compression algorithm for a home directory backup.  Can be set  to  any  suffix\nrecognized  by  tar  --auto-compress.  Defaults to .gz.  Valid Modes: deluser, deluser\n--system,\n\n--backup-to dir\nPlace the backup files not in the current directory but in dir.  This implicitly  sets\n--backup  also.  (defaulting to the current working directory).  Valid Modes: deluser,\ndeluser --system,\n\n--conf file\nUse file instead of the default files /etc/deluser.conf and /etc/adduser.conf.  Multi‐\nple --conf options may be given.\n",
                    "long": "--backup"
                },
                {
                    "name": "--debug",
                    "content": "Synonymous to --stdoutmsglevel=debug. Deprecated.\n",
                    "long": "--debug"
                },
                {
                    "name": "--group",
                    "content": "Remove a group.  This is the default action if the program  is  invoked  as  delgroup.\nValid Mode: deluser.\n\n--help Display brief instructions.\n",
                    "long": "--group"
                },
                {
                    "name": "--only-if-empty",
                    "content": "Only remove if no members are left.  Valid Modes: deluser --group, delgroup,\n",
                    "long": "--only-if-empty"
                },
                {
                    "name": "--quiet",
                    "content": "Synonymous to --stdoutmsglevel=warn. Deprecated.\n",
                    "long": "--quiet"
                },
                {
                    "name": "--remove-all-files",
                    "content": "Remove  all  files  from  the system owned by this user.  Note: --remove-home does not\nhave an effect any more.  If --backup is specified, the files are deleted after having\nperformed the backup.  Valid Modes: deluser, deluser --system,\n",
                    "long": "--remove-all-files"
                },
                {
                    "name": "--remove-home",
                    "content": "Remove the home directory of the user and its mailspool.  If  --backup  is  specified,\nthe  files  are  deleted  after  having  performed  the backup.  Valid Modes: deluser,\ndeluser --system,\n",
                    "long": "--remove-home"
                },
                {
                    "name": "--system",
                    "content": "Only delete if user/group is a system user/group.  If the user does not exist, no  er‐\nror value is returned.  Valid Modes: deluser, deluser --system,\n",
                    "long": "--system"
                },
                {
                    "name": "--verbose",
                    "content": "Synonymous to --stdoutmsglevel=info. Deprecated.\n\n--stdoutmsglevel prio\n--stderrmsglevel prio\n--logmsglevel prio\nMinimum  priority for messages logged to syslog/journal and the console, respectively.\nValues are trace, debug, info, warn, err, and fatal.  Messages with the  priority  set\nhere  or  higher get printed to the respective medium.  Messages printed to stderr are\nnot repeated on stdout.  That allows the local admin to control  adduser's  chattiness\non the console and in the log independently, keeping probably confusing information to\nitself while still leaving helpful information in the log.\n",
                    "long": "--verbose"
                },
                {
                    "name": "--version",
                    "content": "Display version and copyright information.\n",
                    "long": "--version"
                }
            ]
        },
        "EXIT VALUES": {
            "content": "The exit values documented in adduser(8) also apply for deluser.\n\n",
            "subsections": []
        },
        "SECURITY": {
            "content": "deluser needs root privileges and offers, via the --conf command line option to use different\nconfiguration  files.   Do  not  use  sudo(8)  or similar tools to give partial privileges to\ndeluser with restricted command line parameters.  This is easy to circumvent and might  allow\nusers  to  create  arbitrary  accounts.   If you want this, consider writing your own wrapper\nscript and giving privileges to execute that script.\n\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/deluser.conf Default configuration file for deluser(8) and delgroup(8)\n\n/usr/local/sbin/deluser.local\nOptional custom add-ons, see deluser.local(8)\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "adduser(8), deluser.conf(5), deluser.local.conf(8), groupdel(8), userdel(8)\n\nDebian GNU/Linux                                                                          DELUSER(8)",
            "subsections": []
        }
    },
    "summary": "deluser, delgroup - remove a user or group from the system",
    "flags": [
        {
            "flag": "",
            "long": "--backup",
            "arg": null,
            "description": "Backup all files contained in the userhome and the mailspool file to a file named username.tar.bz2 or username.tar.gz. Valid Modes: deluser, deluser --system, --backup-suffix str Select compression algorithm for a home directory backup. Can be set to any suffix recognized by tar --auto-compress. Defaults to .gz. Valid Modes: deluser, deluser --system, --backup-to dir Place the backup files not in the current directory but in dir. This implicitly sets --backup also. (defaulting to the current working directory). Valid Modes: deluser, deluser --system, --conf file Use file instead of the default files /etc/deluser.conf and /etc/adduser.conf. Multi‐ ple --conf options may be given."
        },
        {
            "flag": "",
            "long": "--debug",
            "arg": null,
            "description": "Synonymous to --stdoutmsglevel=debug. Deprecated."
        },
        {
            "flag": "",
            "long": "--group",
            "arg": null,
            "description": "Remove a group. This is the default action if the program is invoked as delgroup. Valid Mode: deluser. --help Display brief instructions."
        },
        {
            "flag": "",
            "long": "--only-if-empty",
            "arg": null,
            "description": "Only remove if no members are left. Valid Modes: deluser --group, delgroup,"
        },
        {
            "flag": "",
            "long": "--quiet",
            "arg": null,
            "description": "Synonymous to --stdoutmsglevel=warn. Deprecated."
        },
        {
            "flag": "",
            "long": "--remove-all-files",
            "arg": null,
            "description": "Remove all files from the system owned by this user. Note: --remove-home does not have an effect any more. If --backup is specified, the files are deleted after having performed the backup. Valid Modes: deluser, deluser --system,"
        },
        {
            "flag": "",
            "long": "--remove-home",
            "arg": null,
            "description": "Remove the home directory of the user and its mailspool. If --backup is specified, the files are deleted after having performed the backup. Valid Modes: deluser, deluser --system,"
        },
        {
            "flag": "",
            "long": "--system",
            "arg": null,
            "description": "Only delete if user/group is a system user/group. If the user does not exist, no er‐ ror value is returned. Valid Modes: deluser, deluser --system,"
        },
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": "Synonymous to --stdoutmsglevel=info. Deprecated. --stdoutmsglevel prio --stderrmsglevel prio --logmsglevel prio Minimum priority for messages logged to syslog/journal and the console, respectively. Values are trace, debug, info, warn, err, and fatal. Messages with the priority set here or higher get printed to the respective medium. Messages printed to stderr are not repeated on stdout. That allows the local admin to control adduser's chattiness on the console and in the log independently, keeping probably confusing information to itself while still leaving helpful information in the log."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Display version and copyright information."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "adduser",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/adduser/8/json"
        },
        {
            "name": "deluser.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/deluser.conf/5/json"
        },
        {
            "name": "deluser.local.conf",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/deluser.local.conf/8/json"
        },
        {
            "name": "groupdel",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/groupdel/8/json"
        },
        {
            "name": "userdel",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/userdel/8/json"
        }
    ]
}