What does the '-r' option do in the 'userdel' command?

QuestionsQuestions8 SkillsProUser Account ManagementSep, 12 2025
0125

The -r option in the userdel command is used to remove the user's home directory and mail spool along with the user account. When you execute the command with this option, it ensures that all files associated with the user are deleted from the system.

Here’s an example of how to use it:

sudo userdel -r username

Replace username with the actual username of the account you want to delete. This command will delete the user and their home directory, including all files within it.

0 Comments

no data
Be the first to share your comment!