Description

The db.databases.deleteOne() method deletes a connection to a data source specified in its argument.

Syntax

Here is the syntax:

db.databases.deleteOne({name: "connection_name"});

On execution, we get:

{
  "acknowledged": true,
  "deletedCount": 1
}

Where:

NameDescription
nameName of the connection to be deleted.