apt pinning package versions












4















Is it possible to pin a version of a debian package?



Is it possible to pin only the major version? (like with pip install "pyramid < 1.4.0" will install the latest 1.3.x but will not upgrade the major version)?










share|improve this question





























    4















    Is it possible to pin a version of a debian package?



    Is it possible to pin only the major version? (like with pip install "pyramid < 1.4.0" will install the latest 1.3.x but will not upgrade the major version)?










    share|improve this question



























      4












      4








      4


      1






      Is it possible to pin a version of a debian package?



      Is it possible to pin only the major version? (like with pip install "pyramid < 1.4.0" will install the latest 1.3.x but will not upgrade the major version)?










      share|improve this question
















      Is it possible to pin a version of a debian package?



      Is it possible to pin only the major version? (like with pip install "pyramid < 1.4.0" will install the latest 1.3.x but will not upgrade the major version)?







      debian apt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 17 '14 at 12:24









      slm

      248k66515678




      248k66515678










      asked Oct 17 '14 at 10:35









      pynonoirpynonoir

      284




      284






















          1 Answer
          1






          active

          oldest

          votes


















          6














          You can do this, for example, in:



          /etc/apt/preferences.d/yourpackage

          Package: yourpackage
          Pin: version 7.*
          Pin-Priority: 999


          This would allow upgrades to yourpackage to versions matching 7.*






          share|improve this answer


























          • Thanks so needed this. TBH I google a bit and cannot find some definitive and comprehensive doc for apt pinning apart from tutorials which are sometimes too specific and random docs here and there. Is there some official doc anywhere?

            – eirc
            Aug 31 '16 at 10:46











          • Haven't seen much other than: man apt_preferences

            – Gregor
            Aug 31 '16 at 21:12






          • 1





            help.ubuntu.com/community/PinningHowto

            – slm
            Jul 29 '18 at 23:16






          • 1





            This example works great, but the answer doesn't specify where to put this. Create the file, for example, /etc/apt/preferences.d/yourpackage

            – berto
            Jan 5 at 20:11













          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%2f162700%2fapt-pinning-package-versions%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          6














          You can do this, for example, in:



          /etc/apt/preferences.d/yourpackage

          Package: yourpackage
          Pin: version 7.*
          Pin-Priority: 999


          This would allow upgrades to yourpackage to versions matching 7.*






          share|improve this answer


























          • Thanks so needed this. TBH I google a bit and cannot find some definitive and comprehensive doc for apt pinning apart from tutorials which are sometimes too specific and random docs here and there. Is there some official doc anywhere?

            – eirc
            Aug 31 '16 at 10:46











          • Haven't seen much other than: man apt_preferences

            – Gregor
            Aug 31 '16 at 21:12






          • 1





            help.ubuntu.com/community/PinningHowto

            – slm
            Jul 29 '18 at 23:16






          • 1





            This example works great, but the answer doesn't specify where to put this. Create the file, for example, /etc/apt/preferences.d/yourpackage

            – berto
            Jan 5 at 20:11


















          6














          You can do this, for example, in:



          /etc/apt/preferences.d/yourpackage

          Package: yourpackage
          Pin: version 7.*
          Pin-Priority: 999


          This would allow upgrades to yourpackage to versions matching 7.*






          share|improve this answer


























          • Thanks so needed this. TBH I google a bit and cannot find some definitive and comprehensive doc for apt pinning apart from tutorials which are sometimes too specific and random docs here and there. Is there some official doc anywhere?

            – eirc
            Aug 31 '16 at 10:46











          • Haven't seen much other than: man apt_preferences

            – Gregor
            Aug 31 '16 at 21:12






          • 1





            help.ubuntu.com/community/PinningHowto

            – slm
            Jul 29 '18 at 23:16






          • 1





            This example works great, but the answer doesn't specify where to put this. Create the file, for example, /etc/apt/preferences.d/yourpackage

            – berto
            Jan 5 at 20:11
















          6












          6








          6







          You can do this, for example, in:



          /etc/apt/preferences.d/yourpackage

          Package: yourpackage
          Pin: version 7.*
          Pin-Priority: 999


          This would allow upgrades to yourpackage to versions matching 7.*






          share|improve this answer















          You can do this, for example, in:



          /etc/apt/preferences.d/yourpackage

          Package: yourpackage
          Pin: version 7.*
          Pin-Priority: 999


          This would allow upgrades to yourpackage to versions matching 7.*







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 8 at 15:45

























          answered Oct 17 '14 at 21:01









          GregorGregor

          601311




          601311













          • Thanks so needed this. TBH I google a bit and cannot find some definitive and comprehensive doc for apt pinning apart from tutorials which are sometimes too specific and random docs here and there. Is there some official doc anywhere?

            – eirc
            Aug 31 '16 at 10:46











          • Haven't seen much other than: man apt_preferences

            – Gregor
            Aug 31 '16 at 21:12






          • 1





            help.ubuntu.com/community/PinningHowto

            – slm
            Jul 29 '18 at 23:16






          • 1





            This example works great, but the answer doesn't specify where to put this. Create the file, for example, /etc/apt/preferences.d/yourpackage

            – berto
            Jan 5 at 20:11





















          • Thanks so needed this. TBH I google a bit and cannot find some definitive and comprehensive doc for apt pinning apart from tutorials which are sometimes too specific and random docs here and there. Is there some official doc anywhere?

            – eirc
            Aug 31 '16 at 10:46











          • Haven't seen much other than: man apt_preferences

            – Gregor
            Aug 31 '16 at 21:12






          • 1





            help.ubuntu.com/community/PinningHowto

            – slm
            Jul 29 '18 at 23:16






          • 1





            This example works great, but the answer doesn't specify where to put this. Create the file, for example, /etc/apt/preferences.d/yourpackage

            – berto
            Jan 5 at 20:11



















          Thanks so needed this. TBH I google a bit and cannot find some definitive and comprehensive doc for apt pinning apart from tutorials which are sometimes too specific and random docs here and there. Is there some official doc anywhere?

          – eirc
          Aug 31 '16 at 10:46





          Thanks so needed this. TBH I google a bit and cannot find some definitive and comprehensive doc for apt pinning apart from tutorials which are sometimes too specific and random docs here and there. Is there some official doc anywhere?

          – eirc
          Aug 31 '16 at 10:46













          Haven't seen much other than: man apt_preferences

          – Gregor
          Aug 31 '16 at 21:12





          Haven't seen much other than: man apt_preferences

          – Gregor
          Aug 31 '16 at 21:12




          1




          1





          help.ubuntu.com/community/PinningHowto

          – slm
          Jul 29 '18 at 23:16





          help.ubuntu.com/community/PinningHowto

          – slm
          Jul 29 '18 at 23:16




          1




          1





          This example works great, but the answer doesn't specify where to put this. Create the file, for example, /etc/apt/preferences.d/yourpackage

          – berto
          Jan 5 at 20:11







          This example works great, but the answer doesn't specify where to put this. Create the file, for example, /etc/apt/preferences.d/yourpackage

          – berto
          Jan 5 at 20:11




















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f162700%2fapt-pinning-package-versions%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

          How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

          is 'sed' thread safe

          How to make a Squid Proxy server?