我刚刚从 16.04 升级到 xubuntu 18.04 LTS,在尝试删除旧的过时的 PPA 时遇到问题:
nicolas@nicolas-UX530UX:~$ sudo ls /etc/apt/sources.list.d
deadsnakes-ubuntu-ppa-xenial.list dropbox.list.save nilarimogard-ubuntu-webupd8-xenial.list.distUpgrade skype-stable.list teamviewer.list.save
deadsnakes-ubuntu-ppa-xenial.list.distUpgrade google-chrome.list nilarimogard-ubuntu-webupd8-xenial.list.save skype-stable.list.distUpgrade
deadsnakes-ubuntu-ppa-xenial.list.save google-chrome.list.distUpgrade ondrej-ubuntu-php-xenial.list skype-stable.list.save
dropbox.list google-chrome.list.save ondrej-ubuntu-php-xenial.list.distUpgrade teamviewer.list
dropbox.list.distUpgrade nilarimogard-ubuntu-webupd8-xenial.list ondrej-ubuntu-php-xenial.list.save teamviewer.list.distUpgrade
在这里我们可以看到我有 PPA
deadsnakes-ubuntu-ppa-xenial.list
因此我尝试以某种方式删除它:
nicolas@nicolas-UX530UX:~$ sudo add-apt-repository --remove ppa:deadsnakes-ubuntu-ppa-xenial.list/ppa
Cannot add PPA: 'ppa:~deadsnakes-ubuntu-ppa-xenial.list/ubuntu/ppa'.
ERROR: '~deadsnakes-ubuntu-ppa-xenial.list' user or team does not exist.
nicolas@nicolas-UX530UX:~$ sudo ppa-purge ppa:deadsnakes-ubuntu-ppa-xenial.list/ppa
Updating packages lists
PPA to be removed: deadsnakes-ubuntu-ppa-xenial.list ppa
Warning: Could not find package list for PPA:
deadsnakes-ubuntu-ppa-xenial.list ppa
知道为什么我无法删除它吗?
答案1
尝试使用,
sudo add-apt-repository --remove ppa:deadsnakes/ppa
对我来说这很有效。