.\" Someone tell emacs that this is an -*- nroff -*- source file. .\" Copyright 1997, 1998, 1999 Guy Maor. .\" Adduser and this manpage are copyright 1995 by Ted Hajek, .\" With much borrowing from the original adduser copyright 1994 by .\" Ian Murdock. .\" .\" This is free software; see the GNU General Public License version .\" 2 or later for copying conditions. There is NO warranty. .TH DELUSER 8 "Version VERSION" "Debian GNU/Linux" .SH NAME deluser, delgroup \- remove a user or group from the system .SH SYNOPSIS .BR deluser " [options] [\-\-remove-home] [\-\-remove-all-files] [\-\-backup] [\-\-backup-to DIR] user" .PP .BR deluser " \-\-group [options] group" .br .BR delgroup " [options] [\-\-only-if-empty] group" .PP .BR deluser " [options] user group" .SS COMMON OPTIONS .br [\-\-quiet] [\-\-system] [\-\-help] [\-\-version] [\-\-conf FILE] .SH DESCRIPTION .PP .BR deluser " and " delgroup remove users and groups from the system according to command line options and configuration information in .IR /etc/deluser.conf and .IR /etc/adduser.conf . They are friendlier front ends to the .BR userdel " and " groupdel programs, removing the home directory as option or even all files on the system owned by the user to be removed, running a custom script, and other features. .BR deluser " and " delgroup can be run in one of three modes: .SS "Remove a normal user" If called with one non-option argument and without the .BR \-\-group " option, " deluser will remove a normal user. By default, .B deluser will remove the user without removing the home directory, the mail spool or any other files on the system owned by the user. Removing the home directory and mail spool can be achieved using the .B \-\-remove-home option. The .B \-\-remove-all-files option removes all files on the system owned by the user. Note that if you activate both options .B \-\-remove-home will have no effect because all files including the home directory and mail spool are already covered by the .B \-\-remove-all-files option. If you want to backup all files before deleting them you can activate the .B \-\-backup option which will create a file username.tar(.gz|.bz2) in the directory specified by the .B \-\-backup-to option (defaulting to the current working directory). Both the remove and backup options can also be activated for default in the configuration file /etc/deluser.conf. See .B deluser.conf(5) for details. If the file .B /usr/local/sbin/deluser.local exists, it will be executed after the user account has been removed in order to do any local cleanup. The arguments passed to .B deluser.local are: .br username uid gid home-directory .SS "Remove a group" If .BR deluser " is called with the " \-\-group " option, or " delgroup is called, a group will be removed. Warning: The primary group of an existing user cannot be removed. If the option .B \-\-only-if-empty is given, the group won't be removed if it has any members left. .SS "Remove a user from a specific group" If called with two non-option arguments, .B deluser will remove a user from a specific group. .SH OPTIONS .TP .B \-\-conf FILE Use FILE instead of .IR /etc/deluser.conf . .TP .B \-\-group Remove a group. This is the default action if the program is invoked as .IR delgroup . .TP .B \-\-help Display brief instructions. .TP .B \-\-quiet Suppress progress messages. .TP .B \-\-system Only delete if user/group is a system user/group. This avoids accidentally deleting non-system users/groups. Additionally, if the user does not exist, no error value is returned. This option is mainly for use in Debian package maintainer scripts. .TP .B \-\-version Display version and copyright information. .SH "RETURN VALUE" .TP .B 0 The action was successfully executed. .TP .B 1 The user to delete was not a system account. No action was performed. .TP .B 2 There is no such user. No action was performed. .TP .B 3 There is no such group. No action was performed. .TP .B 4 Internal error. .TP .B 5 The group to delete is not empty. No action was performed. .TP .B 6 The user does not belong to the specified group. .TP .B 7 You cannot remove a user from its primary group. .SH FILES /etc/deluser.conf .SH "SEE ALSO" deluser.conf(5), adduser(8), userdel(8), groupdel(8) .SH COPYRIGHT Copyright (C) 2000 Roland Bauerschmidt. Modifications (C) 2004 Marc Haber and Joerg Hoh. This manpage and the deluser program are based on adduser which is: .br Copyright (C) 1997, 1998, 1999 Guy Maor. .br Copyright (C) 1995 Ted Hajek, with a great deal borrowed from the original Debian .B adduser .br Copyright (C) 1994 Ian Murdock. .B deluser is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is .I no warranty.