To delete a group in Linux using the groupdel
command, you need to have root privileges.
To delete a group called group1
, you can use the following command:
sudo groupdel group1
This will delete the group group1
from the system.
Note that deleting a group will also delete any user accounts that are members of the group. Make sure you do not delete a group that is still being used by any user accounts on the system.