How to undo sudo add-apt-repository?












31














I run



sudo add-apt-repository ppa:noobslab/indicators


to install my-weather-indicator but it requires GTK3 and I don't want to proceed.



So I'd like to undo that command. I'd checked my /etc/apt/source.list but I didn't find any line related to it.



What should I do now?










share|improve this question





























    31














    I run



    sudo add-apt-repository ppa:noobslab/indicators


    to install my-weather-indicator but it requires GTK3 and I don't want to proceed.



    So I'd like to undo that command. I'd checked my /etc/apt/source.list but I didn't find any line related to it.



    What should I do now?










    share|improve this question



























      31












      31








      31


      8





      I run



      sudo add-apt-repository ppa:noobslab/indicators


      to install my-weather-indicator but it requires GTK3 and I don't want to proceed.



      So I'd like to undo that command. I'd checked my /etc/apt/source.list but I didn't find any line related to it.



      What should I do now?










      share|improve this question















      I run



      sudo add-apt-repository ppa:noobslab/indicators


      to install my-weather-indicator but it requires GTK3 and I don't want to proceed.



      So I'd like to undo that command. I'd checked my /etc/apt/source.list but I didn't find any line related to it.



      What should I do now?







      linux debian apt package-management lubuntu






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 8 at 23:13









      Hee Jin

      1054




      1054










      asked Jan 8 '13 at 0:25









      Sigur

      1,04131940




      1,04131940






















          3 Answers
          3






          active

          oldest

          votes


















          19














          add-apt-repository creates a new file in /etc/apt/sources.list.d for ppa repositories. Besides deleting the appropriate file you also should delete the added gpg key:




          1. get the keyid from apt-key list

          2. delete it via apt-key del $ID






          share|improve this answer



















          • 1




            Item 1 returns pub 1024R/36FD5529 2010-12-14 uid Launchpad PPA for noobslab. What is its $ID?
            – Sigur
            Jan 8 '13 at 0:46






          • 2




            @Sigur 36FD5529 is the id, 1024 is the keylength and the rest is the uid
            – Ulrich Dangel
            Jan 8 '13 at 0:49






          • 1




            It works with del instead of delete.
            – Sigur
            Jan 8 '13 at 0:52



















          29














          From Ubuntu's manual pages (man add-apt-repository):




          -r, --remove Remove the specified repository




          So...



          sudo add-apt-repository -r ppa:noobslab/indicators


          This removes it from the repo list in /etc/apt/sources.list.d/.



          Depending on what you are doing, BEFORE you run the above command -
          If an installed package from that repo is newer than the same package in a standard repo, then manually downgrade with ppa-purge:



          sudo ppa-purge ppa:noobslab/indicators


          For Debian, just delete the .list file in /etc/apt/sources.list.d/






          share|improve this answer























          • Where can I check if it worked? Are there some entries in source.list?
            – Sigur
            Jan 8 '13 at 0:34






          • 2




            @Sigur Yes! The .list files in /etc/apt/sources.list.d/.
            – Christopher
            Jan 8 '13 at 0:37










          • Your first suggestion returns You are about to add the following PPA to your system:. The second one returns sudo: ppa-purge: command not found. I still have .list in /etc/apt/sources.list.d/
            – Sigur
            Jan 8 '13 at 0:44






          • 1




            Strangely, I'm on 14.04 and there is no -r nor --remove option for me.
            – Mikhail Batcer
            Sep 22 '17 at 7:40



















          3














          If you want to undo add-apt-repository, having used a format like e.g.



          sudo add-apt-repository 
          "deb [arch=amd64] https://download.docker.com/linux/ubuntu
          $(lsb_release -cs)
          stable"


          Use the output displayed by the following command to find the repository you want to delete



          grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*


          Example output:



          /etc/apt/sources.list:#deb cdrom:[Linux Mint 17.3 _Rosa_ - Release amd64 20151128]/ trusty contrib main non-free
          /etc/apt/sources.list.d/additional-repositories.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
          ...



          In this example /etc/apt/sources.list.d/additional-repositories.list would have the repository to undo/remove. Edit the file and remove its line.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f60595%2fhow-to-undo-sudo-add-apt-repository%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            19














            add-apt-repository creates a new file in /etc/apt/sources.list.d for ppa repositories. Besides deleting the appropriate file you also should delete the added gpg key:




            1. get the keyid from apt-key list

            2. delete it via apt-key del $ID






            share|improve this answer



















            • 1




              Item 1 returns pub 1024R/36FD5529 2010-12-14 uid Launchpad PPA for noobslab. What is its $ID?
              – Sigur
              Jan 8 '13 at 0:46






            • 2




              @Sigur 36FD5529 is the id, 1024 is the keylength and the rest is the uid
              – Ulrich Dangel
              Jan 8 '13 at 0:49






            • 1




              It works with del instead of delete.
              – Sigur
              Jan 8 '13 at 0:52
















            19














            add-apt-repository creates a new file in /etc/apt/sources.list.d for ppa repositories. Besides deleting the appropriate file you also should delete the added gpg key:




            1. get the keyid from apt-key list

            2. delete it via apt-key del $ID






            share|improve this answer



















            • 1




              Item 1 returns pub 1024R/36FD5529 2010-12-14 uid Launchpad PPA for noobslab. What is its $ID?
              – Sigur
              Jan 8 '13 at 0:46






            • 2




              @Sigur 36FD5529 is the id, 1024 is the keylength and the rest is the uid
              – Ulrich Dangel
              Jan 8 '13 at 0:49






            • 1




              It works with del instead of delete.
              – Sigur
              Jan 8 '13 at 0:52














            19












            19








            19






            add-apt-repository creates a new file in /etc/apt/sources.list.d for ppa repositories. Besides deleting the appropriate file you also should delete the added gpg key:




            1. get the keyid from apt-key list

            2. delete it via apt-key del $ID






            share|improve this answer














            add-apt-repository creates a new file in /etc/apt/sources.list.d for ppa repositories. Besides deleting the appropriate file you also should delete the added gpg key:




            1. get the keyid from apt-key list

            2. delete it via apt-key del $ID







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 8 '13 at 0:53

























            answered Jan 8 '13 at 0:32









            Ulrich Dangel

            20.2k25771




            20.2k25771








            • 1




              Item 1 returns pub 1024R/36FD5529 2010-12-14 uid Launchpad PPA for noobslab. What is its $ID?
              – Sigur
              Jan 8 '13 at 0:46






            • 2




              @Sigur 36FD5529 is the id, 1024 is the keylength and the rest is the uid
              – Ulrich Dangel
              Jan 8 '13 at 0:49






            • 1




              It works with del instead of delete.
              – Sigur
              Jan 8 '13 at 0:52














            • 1




              Item 1 returns pub 1024R/36FD5529 2010-12-14 uid Launchpad PPA for noobslab. What is its $ID?
              – Sigur
              Jan 8 '13 at 0:46






            • 2




              @Sigur 36FD5529 is the id, 1024 is the keylength and the rest is the uid
              – Ulrich Dangel
              Jan 8 '13 at 0:49






            • 1




              It works with del instead of delete.
              – Sigur
              Jan 8 '13 at 0:52








            1




            1




            Item 1 returns pub 1024R/36FD5529 2010-12-14 uid Launchpad PPA for noobslab. What is its $ID?
            – Sigur
            Jan 8 '13 at 0:46




            Item 1 returns pub 1024R/36FD5529 2010-12-14 uid Launchpad PPA for noobslab. What is its $ID?
            – Sigur
            Jan 8 '13 at 0:46




            2




            2




            @Sigur 36FD5529 is the id, 1024 is the keylength and the rest is the uid
            – Ulrich Dangel
            Jan 8 '13 at 0:49




            @Sigur 36FD5529 is the id, 1024 is the keylength and the rest is the uid
            – Ulrich Dangel
            Jan 8 '13 at 0:49




            1




            1




            It works with del instead of delete.
            – Sigur
            Jan 8 '13 at 0:52




            It works with del instead of delete.
            – Sigur
            Jan 8 '13 at 0:52













            29














            From Ubuntu's manual pages (man add-apt-repository):




            -r, --remove Remove the specified repository




            So...



            sudo add-apt-repository -r ppa:noobslab/indicators


            This removes it from the repo list in /etc/apt/sources.list.d/.



            Depending on what you are doing, BEFORE you run the above command -
            If an installed package from that repo is newer than the same package in a standard repo, then manually downgrade with ppa-purge:



            sudo ppa-purge ppa:noobslab/indicators


            For Debian, just delete the .list file in /etc/apt/sources.list.d/






            share|improve this answer























            • Where can I check if it worked? Are there some entries in source.list?
              – Sigur
              Jan 8 '13 at 0:34






            • 2




              @Sigur Yes! The .list files in /etc/apt/sources.list.d/.
              – Christopher
              Jan 8 '13 at 0:37










            • Your first suggestion returns You are about to add the following PPA to your system:. The second one returns sudo: ppa-purge: command not found. I still have .list in /etc/apt/sources.list.d/
              – Sigur
              Jan 8 '13 at 0:44






            • 1




              Strangely, I'm on 14.04 and there is no -r nor --remove option for me.
              – Mikhail Batcer
              Sep 22 '17 at 7:40
















            29














            From Ubuntu's manual pages (man add-apt-repository):




            -r, --remove Remove the specified repository




            So...



            sudo add-apt-repository -r ppa:noobslab/indicators


            This removes it from the repo list in /etc/apt/sources.list.d/.



            Depending on what you are doing, BEFORE you run the above command -
            If an installed package from that repo is newer than the same package in a standard repo, then manually downgrade with ppa-purge:



            sudo ppa-purge ppa:noobslab/indicators


            For Debian, just delete the .list file in /etc/apt/sources.list.d/






            share|improve this answer























            • Where can I check if it worked? Are there some entries in source.list?
              – Sigur
              Jan 8 '13 at 0:34






            • 2




              @Sigur Yes! The .list files in /etc/apt/sources.list.d/.
              – Christopher
              Jan 8 '13 at 0:37










            • Your first suggestion returns You are about to add the following PPA to your system:. The second one returns sudo: ppa-purge: command not found. I still have .list in /etc/apt/sources.list.d/
              – Sigur
              Jan 8 '13 at 0:44






            • 1




              Strangely, I'm on 14.04 and there is no -r nor --remove option for me.
              – Mikhail Batcer
              Sep 22 '17 at 7:40














            29












            29








            29






            From Ubuntu's manual pages (man add-apt-repository):




            -r, --remove Remove the specified repository




            So...



            sudo add-apt-repository -r ppa:noobslab/indicators


            This removes it from the repo list in /etc/apt/sources.list.d/.



            Depending on what you are doing, BEFORE you run the above command -
            If an installed package from that repo is newer than the same package in a standard repo, then manually downgrade with ppa-purge:



            sudo ppa-purge ppa:noobslab/indicators


            For Debian, just delete the .list file in /etc/apt/sources.list.d/






            share|improve this answer














            From Ubuntu's manual pages (man add-apt-repository):




            -r, --remove Remove the specified repository




            So...



            sudo add-apt-repository -r ppa:noobslab/indicators


            This removes it from the repo list in /etc/apt/sources.list.d/.



            Depending on what you are doing, BEFORE you run the above command -
            If an installed package from that repo is newer than the same package in a standard repo, then manually downgrade with ppa-purge:



            sudo ppa-purge ppa:noobslab/indicators


            For Debian, just delete the .list file in /etc/apt/sources.list.d/







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited yesterday









            BanAnanas

            32




            32










            answered Jan 8 '13 at 0:31









            Christopher

            10.1k32847




            10.1k32847












            • Where can I check if it worked? Are there some entries in source.list?
              – Sigur
              Jan 8 '13 at 0:34






            • 2




              @Sigur Yes! The .list files in /etc/apt/sources.list.d/.
              – Christopher
              Jan 8 '13 at 0:37










            • Your first suggestion returns You are about to add the following PPA to your system:. The second one returns sudo: ppa-purge: command not found. I still have .list in /etc/apt/sources.list.d/
              – Sigur
              Jan 8 '13 at 0:44






            • 1




              Strangely, I'm on 14.04 and there is no -r nor --remove option for me.
              – Mikhail Batcer
              Sep 22 '17 at 7:40


















            • Where can I check if it worked? Are there some entries in source.list?
              – Sigur
              Jan 8 '13 at 0:34






            • 2




              @Sigur Yes! The .list files in /etc/apt/sources.list.d/.
              – Christopher
              Jan 8 '13 at 0:37










            • Your first suggestion returns You are about to add the following PPA to your system:. The second one returns sudo: ppa-purge: command not found. I still have .list in /etc/apt/sources.list.d/
              – Sigur
              Jan 8 '13 at 0:44






            • 1




              Strangely, I'm on 14.04 and there is no -r nor --remove option for me.
              – Mikhail Batcer
              Sep 22 '17 at 7:40
















            Where can I check if it worked? Are there some entries in source.list?
            – Sigur
            Jan 8 '13 at 0:34




            Where can I check if it worked? Are there some entries in source.list?
            – Sigur
            Jan 8 '13 at 0:34




            2




            2




            @Sigur Yes! The .list files in /etc/apt/sources.list.d/.
            – Christopher
            Jan 8 '13 at 0:37




            @Sigur Yes! The .list files in /etc/apt/sources.list.d/.
            – Christopher
            Jan 8 '13 at 0:37












            Your first suggestion returns You are about to add the following PPA to your system:. The second one returns sudo: ppa-purge: command not found. I still have .list in /etc/apt/sources.list.d/
            – Sigur
            Jan 8 '13 at 0:44




            Your first suggestion returns You are about to add the following PPA to your system:. The second one returns sudo: ppa-purge: command not found. I still have .list in /etc/apt/sources.list.d/
            – Sigur
            Jan 8 '13 at 0:44




            1




            1




            Strangely, I'm on 14.04 and there is no -r nor --remove option for me.
            – Mikhail Batcer
            Sep 22 '17 at 7:40




            Strangely, I'm on 14.04 and there is no -r nor --remove option for me.
            – Mikhail Batcer
            Sep 22 '17 at 7:40











            3














            If you want to undo add-apt-repository, having used a format like e.g.



            sudo add-apt-repository 
            "deb [arch=amd64] https://download.docker.com/linux/ubuntu
            $(lsb_release -cs)
            stable"


            Use the output displayed by the following command to find the repository you want to delete



            grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*


            Example output:



            /etc/apt/sources.list:#deb cdrom:[Linux Mint 17.3 _Rosa_ - Release amd64 20151128]/ trusty contrib main non-free
            /etc/apt/sources.list.d/additional-repositories.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
            ...



            In this example /etc/apt/sources.list.d/additional-repositories.list would have the repository to undo/remove. Edit the file and remove its line.






            share|improve this answer


























              3














              If you want to undo add-apt-repository, having used a format like e.g.



              sudo add-apt-repository 
              "deb [arch=amd64] https://download.docker.com/linux/ubuntu
              $(lsb_release -cs)
              stable"


              Use the output displayed by the following command to find the repository you want to delete



              grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*


              Example output:



              /etc/apt/sources.list:#deb cdrom:[Linux Mint 17.3 _Rosa_ - Release amd64 20151128]/ trusty contrib main non-free
              /etc/apt/sources.list.d/additional-repositories.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
              ...



              In this example /etc/apt/sources.list.d/additional-repositories.list would have the repository to undo/remove. Edit the file and remove its line.






              share|improve this answer
























                3












                3








                3






                If you want to undo add-apt-repository, having used a format like e.g.



                sudo add-apt-repository 
                "deb [arch=amd64] https://download.docker.com/linux/ubuntu
                $(lsb_release -cs)
                stable"


                Use the output displayed by the following command to find the repository you want to delete



                grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*


                Example output:



                /etc/apt/sources.list:#deb cdrom:[Linux Mint 17.3 _Rosa_ - Release amd64 20151128]/ trusty contrib main non-free
                /etc/apt/sources.list.d/additional-repositories.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
                ...



                In this example /etc/apt/sources.list.d/additional-repositories.list would have the repository to undo/remove. Edit the file and remove its line.






                share|improve this answer












                If you want to undo add-apt-repository, having used a format like e.g.



                sudo add-apt-repository 
                "deb [arch=amd64] https://download.docker.com/linux/ubuntu
                $(lsb_release -cs)
                stable"


                Use the output displayed by the following command to find the repository you want to delete



                grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*


                Example output:



                /etc/apt/sources.list:#deb cdrom:[Linux Mint 17.3 _Rosa_ - Release amd64 20151128]/ trusty contrib main non-free
                /etc/apt/sources.list.d/additional-repositories.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
                ...



                In this example /etc/apt/sources.list.d/additional-repositories.list would have the repository to undo/remove. Edit the file and remove its line.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 20 '17 at 1:12









                T. Webster

                4043617




                4043617






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f60595%2fhow-to-undo-sudo-add-apt-repository%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    サソリ

                    広島県道265号伴広島線

                    Setup Asymptote in Texstudio