Removing apt repository in ubuntu karmic koala

ubuntuA new script introduced in Ubuntu 9.10 Karmic Koala to add apt repositories and import the gpg key is “add-apt-repository“.

Sample usage:

~$ sudo add-apt-repository ppa:gmpc-trunk/mpd-trunk

For some reason there is no script to remove repositories that have been set up this way.

Luckily the guys from sourceslist.eu (it) wrote a script fixing this issue.

It can be downloaded either as a bash script or as deb package.

After the installation the usage is straighjt forward using the same syntax:

~$ sudo remove-apt-repository gmpc-trunk/mpd-trunk

December 4th, 2009 / Tech Talk / tim

5 Responses to “Removing apt repository in ubuntu karmic koala”

  1. ingalex says:

    Hello! I am the author of the script and the webmaster of the site http://www.sourceslist.eu. You should make a small correction to your article.
    The correct syntax to remove the repository is “sudo remove-apt-repository gmpc-trunk/mpd-trunk” and not “sudo remove-apt-repository ppa:gmpc-trunk/mpd-trunk.
    However on my site are totally alone, every collaboration is always welcome. Bye Ingalex :-)

  2. tim says:

    fixed. thanks!

  3. Srini says:

    remove-apt-repository ubuntu-mozilla-daily/ppa
    unsuccessful removing – ppa launchpad repository not present or wrong syntax

  4. Oval says:

    I have no idea if this simply wasn’t implemented in previous versions of Ubuntu (the article is written for 9.10), but as of 10.10, the supported syntax is shown below.

    to add a repository (copied from article, still correct):
    sudo add-apt-repository ppa:gmpc-trunk/mpd-trunk
    sudo apt-get update

    to remove the repository, simply add the “–remove” (or “-r”) option:
    sudo add-apt-repository –remove ppa:gmpc-trunk/mpd-trunk

  5. InjecTioN says:

    Could the writer of this article update the article with contents of the last reply from Oval?

    In Ubuntu 11.04 natty the “#sudo remove-apt-repository gmpc-trunk/mpd-trunk” doesn’t work anymore. It has been changed into:

    #sudo add-apt-repository –remove ppa:gmpc-trunk/mpd-trunk” (“–remove” can be replaced by “-r”)

    Spread the word… It might help the community!

Leave a Reply