具体来说,我正在尝试卸载 mongodb,因为这是我启动后按下 htop 时得到的结果。
我不再需要 mongodb,我想删除它。所以我按照说明操作这里。
我跑了
sudo service mongod stop
并得到Failed to stop mongod.service: Unit mongod.service not loaded.
然后我继续努力
sudo apt-get purge mongodb-org*
并得到:
E: Unable to locate package mongodb-org*
E: Couldn't find any package by glob 'mongodb-org*'
E: Couldn't find any package by regex 'mongodb-org*'
我应该怎么办?
编辑:根据我尝试的问题sudo apt list --installed *mongo*
,输出是:
mongo-tools/bionic,now 3.6.3-0ubuntu1 amd64 [installed,automatic]
mongodb/bionic,now 1:3.6.3-0ubuntu1 amd64 [installed]
mongodb-clients/bionic,now 1:3.6.3-0ubuntu1 amd64 [installed,automatic]
mongodb-server/bionic,now 1:3.6.3-0ubuntu1 all [installed,automatic]
mongodb-server-core/bionic,now 1:3.6.3-0ubuntu1 amd64 [installed,automatic]
我也试过dpkg -l | grep 'mongo'
ii mongo-tools 3.6.3-0ubuntu1 amd64 collection of tools for administering MongoDB servers
ii mongodb 1:3.6.3-0ubuntu1 amd64 object/document-oriented database (metapackage)
ii mongodb-clients 1:3.6.3-0ubuntu1 amd64 object/document-oriented database (client apps)
ii mongodb-server 1:3.6.3-0ubuntu1 all object/document-oriented database (managed server package)
ii mongodb-server-core 1:3.6.3-0ubuntu1 amd64 object/document-oriented database (server binaries package)
答案1
根据更新的问题,没有匹配的软件包mongodb-org*
。卸载 mongodb 可能通过发出以下命令来实现
sudo apt purge mongodb*
卸载 mongo-tools
sudo apt purge mongo-tools