SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / ubuntu / Questions / 307
Accepted
David Ashford
David Ashford
Asked: 2010-07-30 01:09:42 +0800 CST2010-07-30 01:09:42 +0800 CST 2010-07-30 01:09:42 +0800 CST

How can PPAs be removed?

  • 772

I've added many PPAs using the add-apt-repository command. Is there a simple way to remove these PPAs? I've checked in /etc/apt/sources.list for the appropriate deb lines but they aren't there.

This is on a server system so a command line solution would be great!

ppa apt
  • 26 26 Answers
  • 1811788 Views

26 Answers

  • Voted
  1. Best Answer
    Burn0ut
    2010-07-30T01:17:12+08:002010-07-30T01:17:12+08:00

    There are a number of options:

    1. Use the --remove flag, similar to how the PPA was added:

      sudo add-apt-repository --remove ppa:whatever/ppa
      
    2. You can also remove PPAs by deleting the .list files from /etc/apt/sources.list.d directory.

    3. As a safer alternative, you can install ppa-purge:

      sudo apt-get install ppa-purge
      

      And then remove the PPA, downgrading gracefully packages it provided to packages provided by official repositories:

      sudo ppa-purge ppa:whatever/ppa
      

      Note that this will uninstall packages provided by the PPA, but not those provided by the official repositories. If you want to remove them, you should tell it to apt:

      sudo apt-get purge package_name
      
    4. Last but not least, you can also disable or remove PPAs from the "Software Sources" section in Ubuntu Settings with a few clicks of your mouse (no terminal needed).

    • 1938
  2. ish
    2012-08-08T15:09:02+08:002012-08-08T15:09:02+08:00

    Simply run apt-add-repository again with the --remove option to remove a PPA added via the command-line. For example:

    sudo apt-add-repository --remove ppa:kernel-ppa/ppa
    

    Then update with:

    sudo apt-get update
    
    • 306
  3. user76204
    2012-08-08T15:42:45+08:002012-08-08T15:42:45+08:00

    Alternately, as ppas are stored in /etc/apt/sources.list.d you can find the one you want to remove by entering:

    ls /etc/apt/sources.list.d
    

    Then when you have noted the name of that offending ppa (e.g. myppa.list), you can enter:

    sudo rm -i /etc/apt/sources.list.d/myppa.list
    

    Take care with rm (hence why I have used the interactive switch so you can confirm your actions. Then run sudo apt-get update afterwards.

    This method merely removes the ppa .list file; it does not remove any other files or sort out any other problems caused by the ppa; for that you could use ppa-purge after you have got your update ability back (I know you mentioned this in your question, but I am adding this point for future readers): see here for more information on ppa-purge.

    Also take into account that if you previously added the key of the repo as trusted you should remove it:

    # list the trusted keys
    sudo apt-key list
    # remove the key
    sudo apt-key del KEY_ID
    
    • 232
  4. kone4040
    2010-07-30T01:20:57+08:002010-07-30T01:20:57+08:00

    You can use the

    sudo ppa-purge ppa:repository-name/subdirectory
    

    command in a terminal.

    You will first need to install ppa-purge to use this command. To do so, use sudo apt-get install ppa-purge or click this button:

    Install via the software center
    (source: hostmar.co)

    Find out more about it here.

    • 130
  5. crenshaw-dev
    2010-08-06T18:07:00+08:002010-08-06T18:07:00+08:00

    The answers to this question will help you.

    You can manage PPAs in System > Administration > Software Sources or by removing files in /etc/apt/sources.list.d/.

    You can also use a package called ppa-purge.

    And, as I commented on the question I linked to above,

    There is a bug on Launchpad requesting a --remove argument for the add-apt-repository command. I've submitted a merge request to get the feature implemented, but it hasn't yet been accepted. Hopefully you'll have this feature soon though.

    • 49
  6. nhandler
    2010-12-28T10:42:36+08:002010-12-28T10:42:36+08:00

    Some people might prefer to add and remove repositories via a GUI. As of Ubuntu 10.10, this requires a bit of extra work. An explanation is available on the wiki. In order to try and have all answers for this question available in one place, I will try and summarize the important details here. Be sure to check the wiki (especially once a new version of Ubuntu is released) to ensure that this process is still valid.

    First, you will want to re-enable 'Software Sources' in the System->Administration menu. Right click on the Applications/Places/System menu and click 'Edit Menus'.

    Click 'Edit Menus'

    This will open a window, scroll down and click on 'Administration'. Check the box next to 'Software Sources' and then click the 'Close' button.

    Check the box next to 'Software Sources'

    Go to System->Administration and you should see 'Software Sources' in the menu.

    'Software Sources' now in menu

    In the window that opens, click on the 'Other Software' tab at the top.

    'Other Software' tab

    You should see all of the repositories that you have added (including the PPAs added via add-apt-repository). You can temporarily disable a repository by unchecking the box next to it. To remove a repository permanently, highlight it and click on the 'Remove' button. When you are done, hit the 'Close' button.

    As Marcel Stimberg noted earlier:

    This will remove the PPA from the repository list but if the package is a newer version of one in the standard repos, you have to manually downgrade the package afterwards. ppa-purge (see other answer) does that for you.

    Hopefully, this will help.

    • 35
  7. Dave
    2012-08-14T19:35:30+08:002012-08-14T19:35:30+08:00

    ppa-purge is your friend. It automatically uninstalls whatever you installed via the ppa and then removes the ppa.

    Install ppa-purge via:

    sudo apt-get install ppa-purge

    and the use it like this:

    sudo ppa-purge ppa-url

    Viola.

    • 26
  8. user222758
    2010-12-20T18:27:53+08:002010-12-20T18:27:53+08:00

    Since Ubuntu Maverick (10.10) add-apt-repository accepts a -r or --remove parameter which removes the PPA in the same way you installed it. :)

    So:

    Install: sudo apt-add-repository ppa:user/repository

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

    • 24
  9. mrówa
    2012-08-08T15:10:22+08:002012-08-08T15:10:22+08:00

    Run Ubuntu Software Center and from the menu choose "Software Sources" - there you can add/edit/remove repositories.

    • 20
  10. krizna
    2012-08-08T17:27:58+08:002012-08-08T17:27:58+08:00

    Run these commands:

    sudo add-apt-repository --remove ppa:kernel-ppa/ppa 
    sudo apt-get update
    
    • 14

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    How to add a directory to the PATH?

    • 17 Answers
  • Marko Smith

    How do I install .run files?

    • 7 Answers
  • Marko Smith

    How to list all installed packages

    • 24 Answers
  • Marko Smith

    How do I get the CPU temperature?

    • 21 Answers
  • Marko Smith

    Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

    • 25 Answers
  • Marko Smith

    How can I add a user as a new sudoer using the command line?

    • 7 Answers
  • Marko Smith

    Change folder permissions and ownership

    • 9 Answers
  • Marko Smith

    How do you restart Apache?

    • 13 Answers
  • Marko Smith

    How can I uninstall software?

    • 11 Answers
  • Marko Smith

    How can PPAs be removed?

    • 26 Answers
  • Martin Hope
    justingrif How to add a directory to the PATH? 2009-07-23 12:42:23 +0800 CST
  • Martin Hope
    NES How to enable or disable services? 2010-12-30 13:03:32 +0800 CST
  • Martin Hope
    Ivan How to list all installed packages 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    Olivier Lalonde How to keep processes running after ending ssh session? 2010-10-22 04:09:13 +0800 CST
  • Martin Hope
    David B How can I add a user as a new sudoer using the command line? 2010-10-16 04:02:45 +0800 CST
  • Martin Hope
    Hans How do I remove old kernel versions to clean up the boot menu? 2010-08-21 19:37:01 +0800 CST
  • Martin Hope
    David Barry How do I determine the total size of a directory (folder) from the command line? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "The following packages have been kept back:" Why and how do I solve it? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford How can PPAs be removed? 2010-07-30 01:09:42 +0800 CST

Related Questions

Trending Tags

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve