How to upgrade one single package and all its dependencies with apt?

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












3















I am using curl in a building script on Travis CI. There is apt-get update && apt-get upgrade in my before_install option. The command consumes some time before building. However, I only need to upgrade curl itself and all its dependencies. If I use apt-get install curl only curl and libcurl3 will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g and other dependencies of curl or libcurl3. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies?










share|improve this question



















  • 2





    That should already be happening if you do apt-get install curl. At least if it is dependency information is correct in the package.

    – Zoredache
    Jan 8 at 19:12






  • 2





    Possible duplicate of how to upgrade a single package in debian

    – GAD3R
    Jan 8 at 22:25











  • @Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run apt-get install curl libcurl3 only the two packages will be upgraded, other dependencies of libcurl3 like libssl1.0.0 and libc6 will not be upgraded.

    – Steven Yang
    Jan 9 at 9:17











  • Immediate dependencies, or also transitive dependencies? The former is much easier (e.g. aptitude install '~rcurl') than the latter.

    – Toby Speight
    Jan 9 at 14:35












  • @TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on packages.ubuntu.com to upgrade.

    – Steven Yang
    Jan 9 at 16:06















3















I am using curl in a building script on Travis CI. There is apt-get update && apt-get upgrade in my before_install option. The command consumes some time before building. However, I only need to upgrade curl itself and all its dependencies. If I use apt-get install curl only curl and libcurl3 will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g and other dependencies of curl or libcurl3. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies?










share|improve this question



















  • 2





    That should already be happening if you do apt-get install curl. At least if it is dependency information is correct in the package.

    – Zoredache
    Jan 8 at 19:12






  • 2





    Possible duplicate of how to upgrade a single package in debian

    – GAD3R
    Jan 8 at 22:25











  • @Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run apt-get install curl libcurl3 only the two packages will be upgraded, other dependencies of libcurl3 like libssl1.0.0 and libc6 will not be upgraded.

    – Steven Yang
    Jan 9 at 9:17











  • Immediate dependencies, or also transitive dependencies? The former is much easier (e.g. aptitude install '~rcurl') than the latter.

    – Toby Speight
    Jan 9 at 14:35












  • @TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on packages.ubuntu.com to upgrade.

    – Steven Yang
    Jan 9 at 16:06













3












3








3


1






I am using curl in a building script on Travis CI. There is apt-get update && apt-get upgrade in my before_install option. The command consumes some time before building. However, I only need to upgrade curl itself and all its dependencies. If I use apt-get install curl only curl and libcurl3 will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g and other dependencies of curl or libcurl3. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies?










share|improve this question
















I am using curl in a building script on Travis CI. There is apt-get update && apt-get upgrade in my before_install option. The command consumes some time before building. However, I only need to upgrade curl itself and all its dependencies. If I use apt-get install curl only curl and libcurl3 will be upgraded. Of course I can manually write apt-get install curl libcurl3 libc6 libcomerr2 openssl zlib1g and other dependencies of curl or libcurl3. But is it possible to automatically upgrade all the dependencies of selected packages (not only the dependencies that do not meet the version requirement of the selected packages) such as apt-get install curl --upgrade-dependencies?







apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 9 at 13:07







Steven Yang

















asked Jan 8 at 19:00









Steven YangSteven Yang

422




422







  • 2





    That should already be happening if you do apt-get install curl. At least if it is dependency information is correct in the package.

    – Zoredache
    Jan 8 at 19:12






  • 2





    Possible duplicate of how to upgrade a single package in debian

    – GAD3R
    Jan 8 at 22:25











  • @Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run apt-get install curl libcurl3 only the two packages will be upgraded, other dependencies of libcurl3 like libssl1.0.0 and libc6 will not be upgraded.

    – Steven Yang
    Jan 9 at 9:17











  • Immediate dependencies, or also transitive dependencies? The former is much easier (e.g. aptitude install '~rcurl') than the latter.

    – Toby Speight
    Jan 9 at 14:35












  • @TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on packages.ubuntu.com to upgrade.

    – Steven Yang
    Jan 9 at 16:06












  • 2





    That should already be happening if you do apt-get install curl. At least if it is dependency information is correct in the package.

    – Zoredache
    Jan 8 at 19:12






  • 2





    Possible duplicate of how to upgrade a single package in debian

    – GAD3R
    Jan 8 at 22:25











  • @Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run apt-get install curl libcurl3 only the two packages will be upgraded, other dependencies of libcurl3 like libssl1.0.0 and libc6 will not be upgraded.

    – Steven Yang
    Jan 9 at 9:17











  • Immediate dependencies, or also transitive dependencies? The former is much easier (e.g. aptitude install '~rcurl') than the latter.

    – Toby Speight
    Jan 9 at 14:35












  • @TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on packages.ubuntu.com to upgrade.

    – Steven Yang
    Jan 9 at 16:06







2




2





That should already be happening if you do apt-get install curl. At least if it is dependency information is correct in the package.

– Zoredache
Jan 8 at 19:12





That should already be happening if you do apt-get install curl. At least if it is dependency information is correct in the package.

– Zoredache
Jan 8 at 19:12




2




2





Possible duplicate of how to upgrade a single package in debian

– GAD3R
Jan 8 at 22:25





Possible duplicate of how to upgrade a single package in debian

– GAD3R
Jan 8 at 22:25













@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run apt-get install curl libcurl3 only the two packages will be upgraded, other dependencies of libcurl3 like libssl1.0.0 and libc6 will not be upgraded.

– Steven Yang
Jan 9 at 9:17





@Zoredache This only upgrades packages that do not meet the lowest version of target packages. For example, if I run apt-get install curl libcurl3 only the two packages will be upgraded, other dependencies of libcurl3 like libssl1.0.0 and libc6 will not be upgraded.

– Steven Yang
Jan 9 at 9:17













Immediate dependencies, or also transitive dependencies? The former is much easier (e.g. aptitude install '~rcurl') than the latter.

– Toby Speight
Jan 9 at 14:35






Immediate dependencies, or also transitive dependencies? The former is much easier (e.g. aptitude install '~rcurl') than the latter.

– Toby Speight
Jan 9 at 14:35














@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on packages.ubuntu.com to upgrade.

– Steven Yang
Jan 9 at 16:06





@TobySpeight Both, of course. Now my workaround is manually setting all the dependencies found on packages.ubuntu.com to upgrade.

– Steven Yang
Jan 9 at 16:06










1 Answer
1






active

oldest

votes


















1














The best i can think is something like...



pack=curl
apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)


But the packages, to be upgraded, maybe have dependencies too...






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%2f493306%2fhow-to-upgrade-one-single-package-and-all-its-dependencies-with-apt%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









    1














    The best i can think is something like...



    pack=curl
    apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)


    But the packages, to be upgraded, maybe have dependencies too...






    share|improve this answer



























      1














      The best i can think is something like...



      pack=curl
      apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)


      But the packages, to be upgraded, maybe have dependencies too...






      share|improve this answer

























        1












        1








        1







        The best i can think is something like...



        pack=curl
        apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)


        But the packages, to be upgraded, maybe have dependencies too...






        share|improve this answer













        The best i can think is something like...



        pack=curl
        apt install $(apt-cache depends $pack | grep "Dep|$pack" | cut -d':' -f2)


        But the packages, to be upgraded, maybe have dependencies too...







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 8 at 19:21









        Luciano Andress MartiniLuciano Andress Martini

        3,728931




        3,728931



























            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%2f493306%2fhow-to-upgrade-one-single-package-and-all-its-dependencies-with-apt%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 check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay