Ubuntu – Can’t Purge X Updates PPA Because / is Treated as a Space

inputppapurge

sudo ppa-purge ppa:ubuntu-x-swat/x-updates

I've tried running that command… several times. Copy/pasted it, manually typed it, tried it in XTerm and Terminal, to no avail. The output is always:

Could not find package list for PPA: ubuntu-x-swat x-updates

There is no / in that output, which leads me to believe it's processing the / as a space and trying to find a PPA named exactly that.

How can I fix this?

Best Answer

I believe that's just a misleading error message. A quick glance at the source reveals that it's printing a space where we'd normally type a slash:

warn "Could not find package list for PPA: $PPAOWNER $PPANAME"

So why couldn't it find the package list?

I believe that part of the message is also misleading. You'll likely find that there are, in fact, valid package lists for the PPA in /var/lib/apt/lists/:

$ ls /var/lib/apt/lists/ppa.launchpad.net_ubuntu-x-swat_x-updates_*_Packages
/var/lib/apt/lists/ppa.launchpad.net_ubuntu-x-swat_x-updates_ubuntu_dists_raring_main_binary-amd64_Packages
/var/lib/apt/lists/ppa.launchpad.net_ubuntu-x-swat_x-updates_ubuntu_dists_raring_main_binary-i386_Packages

The thing that's throwing off ppa-purge is that they're empty:

$ file /var/lib/apt/lists/ppa.launchpad.net_ubuntu-x-swat_x-updates_*_Packages
/var/lib/apt/lists/ppa.launchpad.net_ubuntu-x-swat_x-updates_ubuntu_dists_raring_main_binary-amd64_Packages: empty
/var/lib/apt/lists/ppa.launchpad.net_ubuntu-x-swat_x-updates_ubuntu_dists_raring_main_binary-i386_Packages:  empty

It assumes that a repository will always contain packages, and that assumption doesn't hold true for ubuntu-x-swat/x-updates, which at the moment doesn't have any packages for Raring.

If you'd like to remove the PPA, you should be able to use apt-add-repository to remove it from the software sources.

It would also be courteous to let the developers of ppa-purge know about this exception so they can make it respond more helpfully in the future. You can open a bug report by running ubuntu-bug ppa-purge.