如何删除间接依赖包

如何删除间接依赖包

我想删除/usr/bin/jupyter二进制文件的包。最后:

$ pacman -Qo /usr/bin/jupyter
/usr/bin/jupyter is owned by python-jupyter_core 4.11.0-1
$ pacman -R python-jupyter_core
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python-jupyter_core breaks dependency 'python-jupyter_core' required by jupyter-nbformat
:: removing python-jupyter_core breaks dependency 'python-jupyter_core' required by python-jupyter_client

这告诉我,这个包是由另一个包安装的。然后我使用 pactree 来找出:

$ pactree -r python-jupyter_core
python-jupyter_core
├─jupyter-nbformat
│ └─jupyter-nbclient
└─python-jupyter_client
  ├─jupyter-nbclient
  └─python-ipykernel
    └─python-jupyter_client

但是,当我尝试删除树的开头时,python-jupyter_client我再次收到依赖项警告:

$ pacman -R python-jupyter_client
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python-jupyter_client breaks dependency 'python-jupyter_client' required by jupyter-nbclient
:: removing python-jupyter_client breaks dependency 'python-jupyter_client' required by python-ipykernel

如何删除导致安装的软件包/usr/bin/jupyter

答案1

看来我是jupyter使用pipwith安装的sudo(不是一个聪明的主意)。最后:

$ sudo pip uninstall jupyter-core

就是答案。

相关内容