Does userdel remove home directories?

The userdel command does not remove home directories by default. It only removes the user account. If you want to remove the user account along with their home directory, you need to use the -r option with the userdel command.

Here’s the command to do that:

sudo userdel -r username

This will remove the user account and also delete their home directory and mail spool.

0 Comments

no data
Be the first to share your comment!