Remove a member from the replica set
MongoDBReplica SetCommand
rs.remove("mongo2:27017")What it does
Removes the specified host from the replica set configuration.
When to use it
When taking a node out of service or replacing hardware.
Caution
Do not remove the primary; removing members in a way that breaks the majority can make the set unavailable for reads and writes.