This version of the documentation is archived and no longer supported.


  • hostname – Specify one of the existing hosts to remove from the current replica set.

Removes the node described by the hostname parameter from the current replica set. This function will disconnect the shell briefly and forces a reconnection as the replica set renegotiates which node will be primary. As a result, the shell will display an error even if this command succeeds.


Before running the rs.remove() operation, you must shut down the replica set member that you’re removing.

Changed in version 2.2: This procedure is no longer required when using rs.remove(), but it remains good practice.

←   rs.reconfig() rs.status()  →