List installed, top-level packages in Fedora

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











up vote
8
down vote

favorite
1












I used to use yum to list all installed packages:



yum list installed


Now I need to list top level packages only i.e. if a package is a dependency of another, it should not be shown. GNOME's Add/Remove Software can do this but I need the output in a terminal.



I checked yum manual but I could not find a switch for that.










share|improve this question



























    up vote
    8
    down vote

    favorite
    1












    I used to use yum to list all installed packages:



    yum list installed


    Now I need to list top level packages only i.e. if a package is a dependency of another, it should not be shown. GNOME's Add/Remove Software can do this but I need the output in a terminal.



    I checked yum manual but I could not find a switch for that.










    share|improve this question

























      up vote
      8
      down vote

      favorite
      1









      up vote
      8
      down vote

      favorite
      1






      1





      I used to use yum to list all installed packages:



      yum list installed


      Now I need to list top level packages only i.e. if a package is a dependency of another, it should not be shown. GNOME's Add/Remove Software can do this but I need the output in a terminal.



      I checked yum manual but I could not find a switch for that.










      share|improve this question















      I used to use yum to list all installed packages:



      yum list installed


      Now I need to list top level packages only i.e. if a package is a dependency of another, it should not be shown. GNOME's Add/Remove Software can do this but I need the output in a terminal.



      I checked yum manual but I could not find a switch for that.







      linux fedora yum






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 11 '14 at 18:16









      drs

      3,27342758




      3,27342758










      asked Oct 9 '10 at 18:47









      mmonem

      269110




      269110




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          11
          down vote



          accepted










          You can use the tool package-cleanup which is part of yum-utils. Besides finding packages which are not available from the current yum repositories, finding packages with broken dependencies, pruning old kernels and finding duplicate packages it can also find packages on which no other packages depend. Those are called leaves. Do



          yum install yum-utils


          to get package-cleanup and



          package-cleanup --leaves --all


          to get a list of all leaves.






          share|improve this answer




















          • The Debian/Ubuntu terminology for this is orphans.
            – Tshepang
            Feb 24 '11 at 22:05






          • 2




            @Tshepang, this is not correct - not all leaves are unused. And not all orphan packages are necessarily leaves. Orphan packages in Debian terminology means: previously as dependency (including transitive dependencies) installed packages that are now unneeded because the explicitly named installed packages are now removed.
            – maxschlepzig
            Jul 13 '13 at 16:14

















          up vote
          2
          down vote













          You can use the command repoquery (part of the package yum-utils) to get this information:



          $ repoquery --installed --qf '%n - %yumdb_info.reason' --all 
          | grep 'user$' | cut -f1 -d' '


          It only lists packages you have installed on your own - not those which are part of the base install. Depending on your use case this is what you want or not.






          share|improve this answer






















          • This one looks very useful. Thanks! Importantly, the packages are listed without versions and .i686 or .noarch or whatever so no sedding or modification needed before yum install -y.
            – gaoithe
            May 1 '15 at 10:01

















          up vote
          0
          down vote













          You could try dnf history userinstalled which is designed for this purpose. However, it's possible for it to get a bit confused, as this discussion shows.






          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',
            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%2f2934%2flist-installed-top-level-packages-in-fedora%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            11
            down vote



            accepted










            You can use the tool package-cleanup which is part of yum-utils. Besides finding packages which are not available from the current yum repositories, finding packages with broken dependencies, pruning old kernels and finding duplicate packages it can also find packages on which no other packages depend. Those are called leaves. Do



            yum install yum-utils


            to get package-cleanup and



            package-cleanup --leaves --all


            to get a list of all leaves.






            share|improve this answer




















            • The Debian/Ubuntu terminology for this is orphans.
              – Tshepang
              Feb 24 '11 at 22:05






            • 2




              @Tshepang, this is not correct - not all leaves are unused. And not all orphan packages are necessarily leaves. Orphan packages in Debian terminology means: previously as dependency (including transitive dependencies) installed packages that are now unneeded because the explicitly named installed packages are now removed.
              – maxschlepzig
              Jul 13 '13 at 16:14














            up vote
            11
            down vote



            accepted










            You can use the tool package-cleanup which is part of yum-utils. Besides finding packages which are not available from the current yum repositories, finding packages with broken dependencies, pruning old kernels and finding duplicate packages it can also find packages on which no other packages depend. Those are called leaves. Do



            yum install yum-utils


            to get package-cleanup and



            package-cleanup --leaves --all


            to get a list of all leaves.






            share|improve this answer




















            • The Debian/Ubuntu terminology for this is orphans.
              – Tshepang
              Feb 24 '11 at 22:05






            • 2




              @Tshepang, this is not correct - not all leaves are unused. And not all orphan packages are necessarily leaves. Orphan packages in Debian terminology means: previously as dependency (including transitive dependencies) installed packages that are now unneeded because the explicitly named installed packages are now removed.
              – maxschlepzig
              Jul 13 '13 at 16:14












            up vote
            11
            down vote



            accepted







            up vote
            11
            down vote



            accepted






            You can use the tool package-cleanup which is part of yum-utils. Besides finding packages which are not available from the current yum repositories, finding packages with broken dependencies, pruning old kernels and finding duplicate packages it can also find packages on which no other packages depend. Those are called leaves. Do



            yum install yum-utils


            to get package-cleanup and



            package-cleanup --leaves --all


            to get a list of all leaves.






            share|improve this answer












            You can use the tool package-cleanup which is part of yum-utils. Besides finding packages which are not available from the current yum repositories, finding packages with broken dependencies, pruning old kernels and finding duplicate packages it can also find packages on which no other packages depend. Those are called leaves. Do



            yum install yum-utils


            to get package-cleanup and



            package-cleanup --leaves --all


            to get a list of all leaves.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 9 '10 at 19:24









            fschmitt

            7,5113042




            7,5113042











            • The Debian/Ubuntu terminology for this is orphans.
              – Tshepang
              Feb 24 '11 at 22:05






            • 2




              @Tshepang, this is not correct - not all leaves are unused. And not all orphan packages are necessarily leaves. Orphan packages in Debian terminology means: previously as dependency (including transitive dependencies) installed packages that are now unneeded because the explicitly named installed packages are now removed.
              – maxschlepzig
              Jul 13 '13 at 16:14
















            • The Debian/Ubuntu terminology for this is orphans.
              – Tshepang
              Feb 24 '11 at 22:05






            • 2




              @Tshepang, this is not correct - not all leaves are unused. And not all orphan packages are necessarily leaves. Orphan packages in Debian terminology means: previously as dependency (including transitive dependencies) installed packages that are now unneeded because the explicitly named installed packages are now removed.
              – maxschlepzig
              Jul 13 '13 at 16:14















            The Debian/Ubuntu terminology for this is orphans.
            – Tshepang
            Feb 24 '11 at 22:05




            The Debian/Ubuntu terminology for this is orphans.
            – Tshepang
            Feb 24 '11 at 22:05




            2




            2




            @Tshepang, this is not correct - not all leaves are unused. And not all orphan packages are necessarily leaves. Orphan packages in Debian terminology means: previously as dependency (including transitive dependencies) installed packages that are now unneeded because the explicitly named installed packages are now removed.
            – maxschlepzig
            Jul 13 '13 at 16:14




            @Tshepang, this is not correct - not all leaves are unused. And not all orphan packages are necessarily leaves. Orphan packages in Debian terminology means: previously as dependency (including transitive dependencies) installed packages that are now unneeded because the explicitly named installed packages are now removed.
            – maxschlepzig
            Jul 13 '13 at 16:14












            up vote
            2
            down vote













            You can use the command repoquery (part of the package yum-utils) to get this information:



            $ repoquery --installed --qf '%n - %yumdb_info.reason' --all 
            | grep 'user$' | cut -f1 -d' '


            It only lists packages you have installed on your own - not those which are part of the base install. Depending on your use case this is what you want or not.






            share|improve this answer






















            • This one looks very useful. Thanks! Importantly, the packages are listed without versions and .i686 or .noarch or whatever so no sedding or modification needed before yum install -y.
              – gaoithe
              May 1 '15 at 10:01














            up vote
            2
            down vote













            You can use the command repoquery (part of the package yum-utils) to get this information:



            $ repoquery --installed --qf '%n - %yumdb_info.reason' --all 
            | grep 'user$' | cut -f1 -d' '


            It only lists packages you have installed on your own - not those which are part of the base install. Depending on your use case this is what you want or not.






            share|improve this answer






















            • This one looks very useful. Thanks! Importantly, the packages are listed without versions and .i686 or .noarch or whatever so no sedding or modification needed before yum install -y.
              – gaoithe
              May 1 '15 at 10:01












            up vote
            2
            down vote










            up vote
            2
            down vote









            You can use the command repoquery (part of the package yum-utils) to get this information:



            $ repoquery --installed --qf '%n - %yumdb_info.reason' --all 
            | grep 'user$' | cut -f1 -d' '


            It only lists packages you have installed on your own - not those which are part of the base install. Depending on your use case this is what you want or not.






            share|improve this answer














            You can use the command repoquery (part of the package yum-utils) to get this information:



            $ repoquery --installed --qf '%n - %yumdb_info.reason' --all 
            | grep 'user$' | cut -f1 -d' '


            It only lists packages you have installed on your own - not those which are part of the base install. Depending on your use case this is what you want or not.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 13 '13 at 16:17

























            answered Jul 13 '13 at 16:09









            maxschlepzig

            32.7k32135207




            32.7k32135207











            • This one looks very useful. Thanks! Importantly, the packages are listed without versions and .i686 or .noarch or whatever so no sedding or modification needed before yum install -y.
              – gaoithe
              May 1 '15 at 10:01
















            • This one looks very useful. Thanks! Importantly, the packages are listed without versions and .i686 or .noarch or whatever so no sedding or modification needed before yum install -y.
              – gaoithe
              May 1 '15 at 10:01















            This one looks very useful. Thanks! Importantly, the packages are listed without versions and .i686 or .noarch or whatever so no sedding or modification needed before yum install -y.
            – gaoithe
            May 1 '15 at 10:01




            This one looks very useful. Thanks! Importantly, the packages are listed without versions and .i686 or .noarch or whatever so no sedding or modification needed before yum install -y.
            – gaoithe
            May 1 '15 at 10:01










            up vote
            0
            down vote













            You could try dnf history userinstalled which is designed for this purpose. However, it's possible for it to get a bit confused, as this discussion shows.






            share|improve this answer


























              up vote
              0
              down vote













              You could try dnf history userinstalled which is designed for this purpose. However, it's possible for it to get a bit confused, as this discussion shows.






              share|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote









                You could try dnf history userinstalled which is designed for this purpose. However, it's possible for it to get a bit confused, as this discussion shows.






                share|improve this answer














                You could try dnf history userinstalled which is designed for this purpose. However, it's possible for it to get a bit confused, as this discussion shows.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 7 mins ago

























                answered Jul 22 '17 at 20:01









                Ben Creasy

                15618




                15618



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f2934%2flist-installed-top-level-packages-in-fedora%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

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

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?