• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

deluser: command not found

by Deepika

deluser is a command line tool in Linux that can be used to delete a user account and its related files and directories. It is typically used by system administrators to remove user accounts that are no longer needed.

If you encounter the below error while running the command deluser:

deluser: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install adduser
Ubuntu apt-get install adduser
Kali Linux apt-get install adduser
Raspbian apt-get install adduser

deluser Command Examples

1. Remove a user:

# deluser username

2. Remove a user and their home directory:

# deluser --remove-home username

3. Remove a user and their home, but backup their files into a `.tar.gz` file in the specified directory:

# deluser --backup-to path/to/backup_directory --remove-home username

4. Remove a user, and all files owned by them:

# deluser --remove-all-files username

5. To delete a user account and its related files and directories:

# deluser --backup --remove-all-files username

6. To delete a user account and its related files and directories and also delete the user’s mail spool:

# deluser --backup --remove-all-files --remove-mail-spool username

Please note that deluser is a command that is used to delete a user account from the system, it’s important to be careful when using this command as it can cause data loss if used improperly. It’s always a good idea to backup the data before removing a user account.

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to get the date and time of executed command in the history command output
  2. db_load command – generate db database
  3. mdp Command Examples
  4. Understanding /etc/hosts file in Linux
  5. infection Command Examples
  6. chkconfig Command Examples in Linux
  7. chpasswd Command Examples in Linux
  8. reboot Command Examples in Linux
  9. dm-tool: command not found
  10. tee Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright