Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI 102-500 Exam - Topic 7 Question 115 Discussion

Posted by Rodney on Mar 08, 2026 at 06:21 PM

What is true regarding the command userdel --force --remove bob? (Choose TWO correct answers.)

Suggested Answer: A, B

The command userdel --force --remove bob is used to delete the user account named bob and all its associated files. The --force option forces the removal of the user account, even if the user is still logged in.The --remove option forces userdel to remove the user's home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user12. Therefore, options A and B are true regarding this command.

The other options are not true because:

Option C is false because the locate database is not updated by the userdel command.The locate database is updated by the updatedb command, which is usually run by cron as a scheduled job3.

Option D is false because the userdel command does not remove all files owned by bob from all mounted filesystems. The userdel command only removes the user's home directory and mail spool, and it does not search for and delete the user files located in other file systems.You have to search for and delete the files manually1.

Option E is false because the userdel command does not delete the group with the same name as the user, unless the USERGROUPS_ENAB parameter is set to yes in the /etc/login.defs file and the group has no other members14.


How to Delete/Remove Users in Linux (userdel Command) | Linuxize

userdel(8) --- Linux manual page

updatedb(8) --- Linux manual page

Understanding the /etc/login.defs File | Linuxize

Get Premium 102-500 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
26 comments · newest first
KA
Kasandra 2 months ago
I agree with A) and B). No trace of bob left behind!
JO
Johnna 2 months ago
A) and B) for sure. Home directory cleanup is important.
RI
Richelle 2 months ago
I think A) and D) make sense. But D) seems too extreme.
MA
Mabel 2 months ago
A) and B) are definitely correct. Bob's gone from the system.
SH
Shawnna 2 months ago
Right! D is also wrong. Files aren’t removed from all filesystems.
AD
Adolph 3 months ago
C is misleading. The locate database isn't affected by userdel.
CU
Curt 3 months ago
Agreed! A and B make sense. The home directory should be gone.
AL
Alpha 3 months ago
I think A and B are correct. Bob's user data and home directory go.
VI
Vince 3 months ago
I agree with A and B. It’s clear from the command.
CL
Clay 3 months ago
No, D is wrong. Only home directory is deleted.
LI
Lillian 3 months ago
I think A and D. All files should be removed, right?
FA
Fatima 4 months ago
A and B seem right. User bob is gone and home directory too.
DA
Daisy 4 months ago
I thought groups would stay even if the last user is gone.
SA
Sarah 4 months ago
D is definitely not true, just the home directory.
CA
Caprice 5 months ago
Wait, does it really delete all files? Sounds risky!
RO
Rosalia 6 months ago
Totally agree, A and B make sense!
EL
Elbert 6 months ago
A and B are correct.
MA
Mable 6 months ago
C) is definitely not true, right?
RE
Reta 6 months ago
I thought the group deletion was a myth.
LA
Laila 6 months ago
Wait, does it really delete all files? Sounds risky!
LE
Lelia 6 months ago
Totally agree, that's how it works.
MI
Michal 7 months ago
A) and B) are correct!
BE
Benedict 7 months ago
I vaguely recall a practice question mentioning that if a user is the last in a group, that group gets deleted, so maybe option E is also correct?
VI
Vincenza 7 months ago
I feel like option D might be misleading; I don't think all files are removed from all filesystems, just the home directory, right?
LE
Lemuel 7 months ago
I'm not sure about option B, but I remember something about home directories being removed with the --remove flag.
KA
Kara 7 months ago
I think option A is definitely correct since userdel is meant to remove users from the system.
0/2000 characters

Save Cancel