Preventing DPKG from upgrading package being installed

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








up vote
0
down vote

favorite












I'm fairly new to the Linux world, so forgive me if the question is basic, I couldn't find an answer elsewhere.



When I run dpkg to install the version 5.1.14 of Virtualbox via sudo dpkg -i ./debfile followed by sudo apt install -f, i get:



 The following additional packages will be installed:
virtualbox-5.1
Recommended packages:
libsdl-ttf2.0-0
The following packages will be upgraded:
virtualbox-5.1


The installed package ends up being version 5.1.32, which I do not want.
I know how to prevent a package from being upgraded after it's installed, but not while it's being installed.



I'm also forced to use dpkg because both apt and gdebi don't work for some reason, possibly because the version I want to install was meant for Ubuntu 16.10, and it's possible Virtualbox at version 5.1.14 won't work for me at all on Ubuntu 17.10, but I wish to try it anyway.



So, is there a way to force the installation of my preferred version, without it getting upgraded automatically?










share|improve this question

























    up vote
    0
    down vote

    favorite












    I'm fairly new to the Linux world, so forgive me if the question is basic, I couldn't find an answer elsewhere.



    When I run dpkg to install the version 5.1.14 of Virtualbox via sudo dpkg -i ./debfile followed by sudo apt install -f, i get:



     The following additional packages will be installed:
    virtualbox-5.1
    Recommended packages:
    libsdl-ttf2.0-0
    The following packages will be upgraded:
    virtualbox-5.1


    The installed package ends up being version 5.1.32, which I do not want.
    I know how to prevent a package from being upgraded after it's installed, but not while it's being installed.



    I'm also forced to use dpkg because both apt and gdebi don't work for some reason, possibly because the version I want to install was meant for Ubuntu 16.10, and it's possible Virtualbox at version 5.1.14 won't work for me at all on Ubuntu 17.10, but I wish to try it anyway.



    So, is there a way to force the installation of my preferred version, without it getting upgraded automatically?










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm fairly new to the Linux world, so forgive me if the question is basic, I couldn't find an answer elsewhere.



      When I run dpkg to install the version 5.1.14 of Virtualbox via sudo dpkg -i ./debfile followed by sudo apt install -f, i get:



       The following additional packages will be installed:
      virtualbox-5.1
      Recommended packages:
      libsdl-ttf2.0-0
      The following packages will be upgraded:
      virtualbox-5.1


      The installed package ends up being version 5.1.32, which I do not want.
      I know how to prevent a package from being upgraded after it's installed, but not while it's being installed.



      I'm also forced to use dpkg because both apt and gdebi don't work for some reason, possibly because the version I want to install was meant for Ubuntu 16.10, and it's possible Virtualbox at version 5.1.14 won't work for me at all on Ubuntu 17.10, but I wish to try it anyway.



      So, is there a way to force the installation of my preferred version, without it getting upgraded automatically?










      share|improve this question













      I'm fairly new to the Linux world, so forgive me if the question is basic, I couldn't find an answer elsewhere.



      When I run dpkg to install the version 5.1.14 of Virtualbox via sudo dpkg -i ./debfile followed by sudo apt install -f, i get:



       The following additional packages will be installed:
      virtualbox-5.1
      Recommended packages:
      libsdl-ttf2.0-0
      The following packages will be upgraded:
      virtualbox-5.1


      The installed package ends up being version 5.1.32, which I do not want.
      I know how to prevent a package from being upgraded after it's installed, but not while it's being installed.



      I'm also forced to use dpkg because both apt and gdebi don't work for some reason, possibly because the version I want to install was meant for Ubuntu 16.10, and it's possible Virtualbox at version 5.1.14 won't work for me at all on Ubuntu 17.10, but I wish to try it anyway.



      So, is there a way to force the installation of my preferred version, without it getting upgraded automatically?







      upgrade software-installation virtualbox dpkg






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 3 at 11:11









      Blackness

      31




      31




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Since there are not any missing depends, sudo apt-get install -f is unnecessary.



          The following command will prevent changes to the package:



          sudo apt-mark hold virtualbox-5.1





          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2faskubuntu.com%2fquestions%2f1002640%2fpreventing-dpkg-from-upgrading-package-being-installed%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



            accepted










            Since there are not any missing depends, sudo apt-get install -f is unnecessary.



            The following command will prevent changes to the package:



            sudo apt-mark hold virtualbox-5.1





            share|improve this answer
























              up vote
              1
              down vote



              accepted










              Since there are not any missing depends, sudo apt-get install -f is unnecessary.



              The following command will prevent changes to the package:



              sudo apt-mark hold virtualbox-5.1





              share|improve this answer






















                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                Since there are not any missing depends, sudo apt-get install -f is unnecessary.



                The following command will prevent changes to the package:



                sudo apt-mark hold virtualbox-5.1





                share|improve this answer












                Since there are not any missing depends, sudo apt-get install -f is unnecessary.



                The following command will prevent changes to the package:



                sudo apt-mark hold virtualbox-5.1






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 3 at 11:50









                ravery

                5,28451131




                5,28451131



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1002640%2fpreventing-dpkg-from-upgrading-package-being-installed%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491