我要评分
获取效率
正确性
完整性
易理解

Uninstalling MongoDB (Against Source Code Compilation)

Select an uninstallation mode based on the installation mode. If the MongoDB database is installed by compiling the source code, uninstall it by following the instructions in this section.

  1. Check and stop the database process. In this example, 36249 is the MongoDB process ID. Replace it with the actual one.
    1
    2
    ps -ef | grep mongod
    kill -9 36249
    

  2. Delete the software installation directory and data directory of the database.
    1
    2
    rm -rf /usr/local/mongo
    rm -rf /data/mongo