Remove existing group obsolete from the group database.
Which command is appropriate?
groupdel GROUP removes an existing group. Change any user's primary group first if it is still in use.
Detailed explanation
userdel obsoleteIncorrect. userdel removes a user account.
Incorrect. userdel removes a user account.
groupmod -d obsoleteIncorrect. groupmod has no -d deletion option.
Incorrect. groupmod has no -d deletion option.
groupdel obsoleteCorrect. groupdel removes the obsolete group.
Correct. groupdel removes the obsolete group.
delgroup -u obsoleteIncorrect. This is not the standard groupdel form.
Incorrect. This is not the standard groupdel form.
Try it yourself
An example you can run in a temporary verification environment.
groupdel --help | sed -n '1,8p'Expected result
groupdel GROUPの使用方法Key points
- groupdel removes a group
- Different target from userdel
- Check primary-group use
Notes
- Environment: shadow-utils groupdel help / 状態変更なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.