Uninstall Nebula Graph¶
This topic describes how to uninstall Nebula Graph.
Caution
Before re-installing Nebula Graph on a machine, follow this topic to completely uninstall the old Nebula Graph, in case the remaining data interferes with the new services, including inconsistencies between Meta services.
Prerequisite¶
The Nebula Graph services should be stopped before the uninstallation. For more information, see Manage Nebula Graph services.
Step 1: Delete data files of the Storage and Meta Services¶
If you have modified the data_path
in the configuration files for the Meta Service and Storage Service, the directories where Nebula Graph stores data may not be in the installation path of Nebula Graph. Check the configuration files to confirm the data paths, and then manually delete the directories to clear all data.
Note
For a Nebula Graph cluster, delete the data files of all Storage and Meta servers.
-
Check the Storage Service disk settings. For example:
########## Disk ########## # Root data path. Split by comma. e.g. --data_path=/disk1/path1/,/disk2/path2/ # One path per Rocksdb instance. --data_path=/nebula/data/storage
-
Check the Metad Service configurations and find the corresponding metadata directories.
-
Delete the data and the directories found in step 2.
Step 2: Delete the installation directories¶
Note
Delete all installation directories, including the cluster.id
file in them.
The default installation path is /usr/local/nebula
, which is specified by --prefix
while installing Nebula Graph.
Uninstall Nebula Graph deployed with source code¶
Find the installation directories of Nebula Graph, and delete them all.
Uninstall Nebula Graph deployed with RPM packages¶
-
Run the following command to get the Nebula Graph version.
$ rpm -qa | grep "nebula"
The return message is as follows.
nebula-graph-2.6.0-1.x86_64
-
Run the following command to uninstall Nebula Graph.
sudo rpm -e <nebula_version>
For example:
sudo rpm -e nebula-graph-2.6.0-1.x86_64
-
Delete the installation directories.
Uninstall Nebula Graph deployed with DEB packages¶
-
Run the following command to get the Nebula Graph version.
$ dpkg -l | grep "nebula"
The return message is as follows.
ii nebula-graph 2.6.0 amd64 Nebula Package built using CMake
-
Run the following command to uninstall Nebula Graph.
sudo dpkg -r <nebula_version>
For example:
sudo dpkg -r nebula-graph
-
Delete the installation directories.
Uninstall Nebula Graph deployed with Docker Compose¶
-
In the
nebula-docker-compose
directory, run the following command to stop the Nebula Graph services.docker-compose down -v
-
Delete the
nebula-docker-compose
directory.