Google Plus

How to remove repositories using command line in ubuntu

Written by Mel Kham on . Posted in Linux tutorials

This is a simple tip that will show you how to remove ppa repositories,uninstall the package(s)(installed from this repositories) and restore the official package(s) from the official ubuntu repositories with one command . Everybody knows that in karmic the new magic command to add repositories is :

sudo add-apt-repository ppa:<repository-name>/<subdirectory>

you can add a repository easy way without using the old long methode : open  the sources.list and then add the 2 lines and then add the verification keys ….Now adding the repositories and installing the packages are easy, but did you think of the way how  to remove the added repositories and the unistall packages  ?




For example, we suppose that you added a repository and you installed the package< X> from this repository, the installed  packege will replace the default package <Y> from ubuntu oficiel repositories. Now  later you wanted to uninstall the installed package <X> and remove the repository, then restore the default package<Y> from default repositories of ubuntu.

The solution come from PPA-purge, a handy script that allows us to remove all the packages on Launchpad repository, disable this reposiotry and install all packages in the official repositories of their own version of Ubuntu.
All with the simple command :

sudo ppa-purge ppa:<repository-name>/<subdirectory>


You can download the PPA-purge .deb package from the official  link of PPA-purge launchpade and install it, then use the command above to remove the repositories

Thanks to : anxurweb, sourceslist

Usefull links :  https://launchpad.net/~xorg-edgers/+archive/ppa

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • Anonymous

    :P :lol: :idea: :roll: :wink: :shock: :oops: :arrow: :evil:

  • http://enteryoursiteURL... DenverCoder9

    This is unnecessary. apt has a command line option to remove ppa repositories now so the ppa-purge script is not needed.

    use
    sudo apt-add-repository -r ppa:user/repository

    see:
    http://askubuntu.com/questions/18200/how-to-correctly-remove-a-ppa-source

  • http://www.facebook.com/Themadchicken Andrew Van Allen

    Thanks i accedentally installe the wrong java repository and i had to get it out

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

piCool

|

Great ! we have another another master trick :-)

Yilmaz Ulugtekin

|

Just delete the space after the slash (/) it will work.

Pat L

|

I tried it and it works with a regular zip file, but if you password-protect the .zip file it does NOT work.

SK

|

Yes we can. What kind of help you need? We are doing outsourcing and technical support for Linux and Open source worldwide. To know more about the details visit here.

ClintB

|

After install as above, run shell script /opt/Citrix/ICAClient/wfica.sh manually and note lib errors still occur. I had the x64 motif loaded but had to manually install the x86 too. Got that from http://rpmfind.net/linux/rpm2html/search.php?query=libXm.so.4 Even after that, I still had to do a “yum install alsa-lib.i686 alsa-lib.x86_64″ to resolve any additional libasound.so.2 errors. Once those two lib issues were resolved, Citix Web Interface launched apps fine by telling browser to open launch.ica using /opt/Citrix/ICAClient/wfica.sh. Good luck Ernesto!

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .