Skip to content

Uninstalling Percona Server for MongoDBΒΆ

To completely remove Percona Server for MongoDB you need to remove all the installed packages, data and configuration files. If you need the data, consider making a backup before uninstalling Percona Server for MongoDB.

Follow the instructions, relevant to your operating system:

You can remove Percona Server for MongoDB packages with one of the following commands:

  • apt-get remove will only remove the packages and leave the configuration and data files.

  • apt purge will remove all the packages with configuration files and data.

Use either command depending on your needs.

  1. Stop the mongod server:

    $ sudo systemctl stop mongod
    
  2. Remove the packages. There are two options.

    • To keep the configuration and data files, run:

      $ sudo apt remove percona-server-mongodb*
      
    • To delete both the configuration and data files and the packages, run:

      $ sudo apt purge percona-server-mongodb*