How to Delete Groups with groupdel Command in Linux
The “groupdel” command in Linux removes the account from Linux. It supplies a approach for directors to put off a bunch and its related permissions, making it now not accessible for customers or processes.
Using this command, we will deal with and delete customers that we now not want. Here we are going to create a bunch of customers after which delete it making use of the groupdel command.
How to Delete Groups with groupdel Command in Linux
To listing all of the communities run below-mentioned command:
Here we will see group1 displayed which we simply created.
How to Delete a Group Using groupdel Command
Now to delete a certain group we are going to use the below-given command. For illustration, to delete the group1 from listing run the groupdel command:
Once the group is deleting once more, listing all communities to substantiate the deletion. Now once more run the /and many others/group command:
Here we will see the group1 is efficiently eliminated making use of the groupdel command.
For illustration, if a selected group doesn’t delete, the “-f” flag will forcefully delete this group. To delete group1 making use of the “-f” flag, run the under command:
$ sudo groupdel -f group1
The grep command may also verify regardless of whether a selected group is deleted or not.
$ grep ‘^group1’ /and many others/group
If no output is displayed on the terminal, it means the group is already deleted.
For greater data about groupdel run the given command:
Conclusion
The Linux “groupdel” command is a potent instrument for managing group accounts on a Linux system. It facilitates directors to put off communities which can be now not essential, guaranteeing the safety and effectivity of the system by decreasing the quantity of unneeded entry controls.