$ sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mongodb-dev' is not installed, so not removed
Package 'mongodb' is not installed, so not removed
Package 'mongodb-clients' is not installed, so not removed
Package 'mongodb-server' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我尝试安装 ppa 版本(旧文档),现在我认为我有两个版本存在永远无法删除的循环依赖关系。
答案1
我使用 zsh,mongo*
清除时不起作用。切换到 bash 就可以了。