You can remove users from MongoDB by using the removeUser(<username>)
method. You need to first change to the database that the user is on. For example, to remove the testUser
user from the testDB
database, you use the following command from the MongoDB shell:
use testDB
db.removeUser("testUser")