How to temporarily disable and permanently disable repos in Debian based systems?

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I know how to do it on Red Hat based systems.



 yum –disablerepo=* --enablerepo=epel update


The above command will temporarily disable all repos and enable epel and update only epel packages.



 yum update–disablerepo=remi-safe,updates


This will also disable two repos while updating all other enable repos.



What is the equivalent of the above on ubuntu for instance ?



I know we can comment out the repo in the /etc/apt/sources.list.d



But this will permanently disable the repo right?



Is there a way that I can run apt-get update while temporarily disable one repo for instance?







share|improve this question























    up vote
    1
    down vote

    favorite












    I know how to do it on Red Hat based systems.



     yum –disablerepo=* --enablerepo=epel update


    The above command will temporarily disable all repos and enable epel and update only epel packages.



     yum update–disablerepo=remi-safe,updates


    This will also disable two repos while updating all other enable repos.



    What is the equivalent of the above on ubuntu for instance ?



    I know we can comment out the repo in the /etc/apt/sources.list.d



    But this will permanently disable the repo right?



    Is there a way that I can run apt-get update while temporarily disable one repo for instance?







    share|improve this question





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I know how to do it on Red Hat based systems.



       yum –disablerepo=* --enablerepo=epel update


      The above command will temporarily disable all repos and enable epel and update only epel packages.



       yum update–disablerepo=remi-safe,updates


      This will also disable two repos while updating all other enable repos.



      What is the equivalent of the above on ubuntu for instance ?



      I know we can comment out the repo in the /etc/apt/sources.list.d



      But this will permanently disable the repo right?



      Is there a way that I can run apt-get update while temporarily disable one repo for instance?







      share|improve this question











      I know how to do it on Red Hat based systems.



       yum –disablerepo=* --enablerepo=epel update


      The above command will temporarily disable all repos and enable epel and update only epel packages.



       yum update–disablerepo=remi-safe,updates


      This will also disable two repos while updating all other enable repos.



      What is the equivalent of the above on ubuntu for instance ?



      I know we can comment out the repo in the /etc/apt/sources.list.d



      But this will permanently disable the repo right?



      Is there a way that I can run apt-get update while temporarily disable one repo for instance?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Apr 28 at 19:31









      alkabary

      574823




      574823




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          The easiest way I've found to manage repos is to have them in individual files in /etc/apt/sources.list.d/. That way, disabling the repo is as easy as moving the file from /etc/apt/sources.list.d/repo.list to /etc/apt/sources.list.d/repo.list.bak, and re-enabling the repo is as easy as going the other way. You could even create a script which temporarily disables a repo by moving the file, running update/install/whatever, and then moving the file back again.






          share|improve this answer

















          • 1




            … or, if one is used to .bak files being discardable byproducts of various tools, .disabled. (-:
            – JdeBP
            Apr 30 at 7:10










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f440637%2fhow-to-temporarily-disable-and-permanently-disable-repos-in-debian-based-systems%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          The easiest way I've found to manage repos is to have them in individual files in /etc/apt/sources.list.d/. That way, disabling the repo is as easy as moving the file from /etc/apt/sources.list.d/repo.list to /etc/apt/sources.list.d/repo.list.bak, and re-enabling the repo is as easy as going the other way. You could even create a script which temporarily disables a repo by moving the file, running update/install/whatever, and then moving the file back again.






          share|improve this answer

















          • 1




            … or, if one is used to .bak files being discardable byproducts of various tools, .disabled. (-:
            – JdeBP
            Apr 30 at 7:10














          up vote
          1
          down vote













          The easiest way I've found to manage repos is to have them in individual files in /etc/apt/sources.list.d/. That way, disabling the repo is as easy as moving the file from /etc/apt/sources.list.d/repo.list to /etc/apt/sources.list.d/repo.list.bak, and re-enabling the repo is as easy as going the other way. You could even create a script which temporarily disables a repo by moving the file, running update/install/whatever, and then moving the file back again.






          share|improve this answer

















          • 1




            … or, if one is used to .bak files being discardable byproducts of various tools, .disabled. (-:
            – JdeBP
            Apr 30 at 7:10












          up vote
          1
          down vote










          up vote
          1
          down vote









          The easiest way I've found to manage repos is to have them in individual files in /etc/apt/sources.list.d/. That way, disabling the repo is as easy as moving the file from /etc/apt/sources.list.d/repo.list to /etc/apt/sources.list.d/repo.list.bak, and re-enabling the repo is as easy as going the other way. You could even create a script which temporarily disables a repo by moving the file, running update/install/whatever, and then moving the file back again.






          share|improve this answer













          The easiest way I've found to manage repos is to have them in individual files in /etc/apt/sources.list.d/. That way, disabling the repo is as easy as moving the file from /etc/apt/sources.list.d/repo.list to /etc/apt/sources.list.d/repo.list.bak, and re-enabling the repo is as easy as going the other way. You could even create a script which temporarily disables a repo by moving the file, running update/install/whatever, and then moving the file back again.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered Apr 28 at 20:30









          Chiraag

          1968




          1968







          • 1




            … or, if one is used to .bak files being discardable byproducts of various tools, .disabled. (-:
            – JdeBP
            Apr 30 at 7:10












          • 1




            … or, if one is used to .bak files being discardable byproducts of various tools, .disabled. (-:
            – JdeBP
            Apr 30 at 7:10







          1




          1




          … or, if one is used to .bak files being discardable byproducts of various tools, .disabled. (-:
          – JdeBP
          Apr 30 at 7:10




          … or, if one is used to .bak files being discardable byproducts of various tools, .disabled. (-:
          – JdeBP
          Apr 30 at 7:10












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440637%2fhow-to-temporarily-disable-and-permanently-disable-repos-in-debian-based-systems%23new-answer', 'question_page');

          );

          Post as a guest













































































          3DsDsXa iUORuMSNDIhowaZ1Yj3xl2lxfd8MoS,sNNnc tGsW y3uvEJx0tQS f,WFghXV7C9oMCr,peoJ8p9dLO yuC0XBav77,ut yW4
          NtDCfM scvwvsElj1,U8BHY943,qEtCN08A6nXz0xdv,LEXp,WTc m28Y5G4bXqWw

          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          How many registers does an x86_64 CPU actually have?

          Displaying single band from multi-band raster using QGIS