delete mongodb command code example Example: how to delete a document in mongodb to delete a document db.games.deleteOne({name:"Snake"})