Uninstall NebulaGraph¶
This topic describes how to uninstall NebulaGraph.
Caution
Before re-installing NebulaGraph on a machine, follow this topic to completely uninstall the old NebulaGraph, in case the remaining data interferes with the new services, including inconsistencies between Meta services.
Prerequisite¶
The NebulaGraph services should be stopped before the uninstallation. For more information, see Manage NebulaGraph 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 NebulaGraph stores data may not be in the installation path of NebulaGraph. Check the configuration files to confirm the data paths, and then manually delete the directories to clear all data.
Note
For a NebulaGraph 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 NebulaGraph.
Uninstall NebulaGraph deployed with source code¶
Find the installation directories of NebulaGraph, and delete them all.
Uninstall NebulaGraph deployed with RPM packages¶
-
Run the following command to get the NebulaGraph version.
$ rpm -qa | grep "nebula"
The return message is as follows.
nebula-graph-3.8.0-1.x86_64
-
Run the following command to uninstall NebulaGraph.
sudo rpm -e <nebula_version>
For example:
sudo rpm -e nebula-graph-3.8.0-1.x86_64
-
Delete the installation directories.
Uninstall NebulaGraph deployed with DEB packages¶
-
Run the following command to get the NebulaGraph version.
$ dpkg -l | grep "nebula"
The return message is as follows.
ii nebula-graph 3.8.0 amd64 NebulaGraph Package built using CMake
-
Run the following command to uninstall NebulaGraph.
sudo dpkg -r <nebula_version>
For example:
sudo dpkg -r nebula-graph
-
Delete the installation directories.
Uninstall NebulaGraph deployed with Docker Compose¶
-
In the
nebula-docker-compose
directory, run the following command to stop the NebulaGraph services.docker-compose down -v
-
Delete the
nebula-docker-compose
directory.