delgroup command not found

In this troubleshooting guide we learn how to fix delgroup command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

delgroup: command not found

or when using sudo you get the following error message

sudo: delgroup: command not found

Solutions to delgroup: command not found

How To Fix delgroup: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu delgroup is provided by adduser package.

adduser is:

This package includes the ‘adduser’ and ‘deluser’ commands for creating and removing users.

  • ‘adduser’ creates new users and groups and adds existing users to existing groups;
  • ‘deluser’ removes users and groups and removes users from a given group.

Adding users with ‘adduser’ is much easier than adding them manually. Adduser will choose appropriate UID and GID values, create a home directory, copy skeletal user configuration, and automate setting initial values for the user’s password, real name and so on.

Deluser can back up and remove users’ home directories and mail spool or all the files they own on the system.

A custom script can be executed after each of the commands.

To fix this problem, we can install more using the command below.

sudo apt-get -y install adduser

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install adduser.

sudo apt -y install adduser

Or if you have aptitude installed you can use the following command.

sudo aptitude install adduser

Summary

In this tutorial we learn how to fix delgroup command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.