mongocli atlas cluster onlinearchive rm


Online archive is available as a Beta feature. The feature and the corresponding documentation may change at any time during the Beta stage.

The onlinearchive rm command deletes one online archive for the specified cluster. You can also delete an online archive through the Atlas UI or API.


mongocli atlas cluster onlinearchive rm <online-archive-id>
     --clusterName <cluster-name>
     [ --force ]
     [ --output|-o <output-format> ]
     [ --profile|-P <profile-name> ]
     [ --projectId <project-ID> ]


Option Type Description Required?
<online-archive-id> string Unique identifier of the online archive to delete. yes
--clusterName string Name of the cluster. yes
--force   Flag indicating that the archive can be deleted without requiring confirmation. no
--output, -o string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using Go template file

If omitted, the command returns output in the default format.

--profile, -P string Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. no
--projectId string Unique identifier of the project that contains the cluster. If omitted, uses the project ID in the profile or environment variable. no


You must respond affirmatively to a confirmation request before MongoDB CLI completes a request to delete an online archive.


If successful, the command returns the following message:

Archive '<online-archive-id>' deleted


The following example uses the mongocli atlas cluster onlinearchive rm command to delete an archive configured for the cluster named myTestCluster. The command uses the default profile to access the project.

mongocli atlas cluster onlinearchive rm 5f189832e26ec075e10c32d3 --clusterName myTestCluster