Linux Commands - htpasswd (delete user)

by
Jeremy Canfield |
Updated: July 10 2022
| Linux Commands articles
Let's say you have created htpasswd file /usr/local/share/users.htpasswd. The cat command can be used to view the contents of the htpasswd file.
~]# cat /usr/local/share/users.htpasswd
john.doe:$2y$05$sLPYyKUXPaaDfnCXCiz0CueZxRp2eX3NYhgPXaMHBYqCEFeVBZGi6
jane.doe:$2y$05$ZUfeWdLh0Vb1uCHpfS1iTurbeDlUaiigFHSn5dwbCdbcIemXjxVYO
The htpasswd command with the -D (delete) option can be used to delete a user from the htpasswd file.
~]# htpasswd -D /usr/local/share/users.htpasswd jane.doe
Deleting password for user jane.doe
Did you find this article helpful?
If so, consider buying me a coffee over at