mongodb 卸载mongo
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8766579/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
uninstalling mongo
提问by fullstacklife
I am having trouble uninstalling mongo from a 64 bit EC2. In /usr/bin I have mongo and mongod amongst others. When I type mongo from anywhere it opens the shell at version 1.8. I now downloaded 2.0.2 and in that folder when I run mongo it opens up version 2.0.2
我在从 64 位 EC2 卸载 mongo 时遇到问题。在 /usr/bin 中,我有 mongo 和 mongod 等。当我从任何地方输入 mongo 时,它会打开 1.8 版的 shell。我现在下载了 2.0.2 并在该文件夹中运行 mongo 时它打开了 2.0.2 版
My question is how do I purge mongo fully so I can install 2.0.2 without coming across the old 1.8 version?
我的问题是如何完全清除 mongo 以便我可以安装 2.0.2 而不会遇到旧的 1.8 版本?
EDIT: I believe I used yum (it was a while ago), and I think the ec2 is fedora.
编辑:我相信我使用过 yum(不久前),我认为 ec2 是 Fedora。
回答by Animesh Prosad
1.Stop Mongo DB using -
1.停止 Mongo DB 使用 -
sudo service mongod stop
2.Remove Packages using -
2.Remove Packages 使用 -
sudo yum erase $(rpm -qa | grep mongodb-org)
3.Remove Data Directories using -
3.使用 - 删除数据目录
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongo
回答by Dennis Do
yum erase mongo-10gen mongo-10gen-server
百胜擦除 mongo-10gen mongo-10gen-server
回答by James Dunmore
I needed to run a yum list installed | grep mongo
then yum remove those packaged
我需要运行一个yum list installed | grep mongo
然后 yum 删除那些打包的
回答by Diego Velez
This should work
这应该工作
rpm -qa | less | grep mongo
using that command will give you the mongo packages you have installed, after that you can do
使用该命令将为您提供已安装的 mongo 软件包,之后您可以执行
rpm -qa | less | grep mongo | xargs yum remove // <-- this will remove all packages automatically
but can also remove all of them Manually
但也可以手动删除所有这些
回答by tsukimi
this gets the job done easily
这可以轻松完成工作
sudo yum erase mongodb-org*
回答by nixxo_raa
First stop the mongo service
首先停止mongo服务
sudo service mongod stop
须藤服务 mongod 停止
Then remove the packages
然后删除包
sudo yum erase $(rpm -qa | grep mongodb-org)
须藤 yum 擦除 $(rpm -qa | grep mongodb-org)
Then remove the log(data) directories
然后删除日志(数据)目录
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongo
须藤 rm -r /var/log/mongodb
须藤 rm -r /var/lib/mongo
回答by Diwakar upadhyay
For Ubuntu users:
对于 Ubuntu 用户:
First, stop the service of MongoDB and then try uninstalling mongod.
首先,停止MongoDB的服务,然后尝试卸载mongod。
Then, type these commands to uninstall mongodb:
然后,键入这些命令来卸载 mongodb:
sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen
sudo apt-get autoremove
回答by Tyler Brock
I think yum remove mongodb
should do the trick.
我认为yum remove mongodb
应该做的伎俩。
回答by Diwakar upadhyay
Steps to uninstall MongoDB:
卸载MongoDB的步骤:
sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen
sudo apt-get autoremove
sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen
sudo apt-get autoremove
回答by SUNDARRAJAN K
First Stop the service of MongoDB and then try uninstalling mongod.
首先停止MongoDB的服务,然后尝试卸载mongod。