Skip to content

Remove a user and group in linux (Centos / Ubuntu)

Learn how to remove a user in linux. Learn how to remove a group in linux.

Removing a user in linux

To remove a user, we use userdel command.


sudo userdel <user-name>


sudo userdel clouduser

You can also delete that user’s home directory and mail spool by using the -r flag with userdel command.

sudo -r userdel clouduser

Removing a group in linux

To delete a group, groupdel command is used.


sudo groupdel <group-name>


sudo groupdel cloudgroup
See also  Apache Error - Permission denied: AH00072: make_sock: could not bind to address - How to fix?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.