Give list of packages installed with apt a name












1















How can I give a list of packages installed via apt a name, eg. one that I could find with dpkg-query -W my-packages or something similar? For example, call the group
build-essential checkinstall gparted ... of packages my-packages



Rationale: I would like to be able to check if default groups of packages have been installed in my install scripts.



Running Ubuntu 18.04










share|improve this question



























    1















    How can I give a list of packages installed via apt a name, eg. one that I could find with dpkg-query -W my-packages or something similar? For example, call the group
    build-essential checkinstall gparted ... of packages my-packages



    Rationale: I would like to be able to check if default groups of packages have been installed in my install scripts.



    Running Ubuntu 18.04










    share|improve this question

























      1












      1








      1








      How can I give a list of packages installed via apt a name, eg. one that I could find with dpkg-query -W my-packages or something similar? For example, call the group
      build-essential checkinstall gparted ... of packages my-packages



      Rationale: I would like to be able to check if default groups of packages have been installed in my install scripts.



      Running Ubuntu 18.04










      share|improve this question














      How can I give a list of packages installed via apt a name, eg. one that I could find with dpkg-query -W my-packages or something similar? For example, call the group
      build-essential checkinstall gparted ... of packages my-packages



      Rationale: I would like to be able to check if default groups of packages have been installed in my install scripts.



      Running Ubuntu 18.04







      apt 18.04 package-management dpkg






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 8 at 22:59









      jenesaisquoijenesaisquoi

      15010




      15010






















          2 Answers
          2






          active

          oldest

          votes


















          1














          The equivs package seems to do exactly what I wanted, very simply creating a .deb file that can be installed and queried using dpkg-query. See tutorial for walk-through.






          share|improve this answer































            1














            Beside using a meta package I would use a variable:



            $ packages="coreutils wget"

            $ dpkg-query -W $packages
            coreutils 8.28-1ubuntu1
            wget 1.19.4-1ubuntu2.1

            $ echo $?
            0


            Means everything is fine (1) means something is missing.



            Find a list of missing packages:



            $ packages="coreutils wget 0ad pkg1 nonexits"
            $ dpkg-query -W $packages 2>&1 > /dev/null | rev | cut -f1 -d' ' | rev
            0ad
            pkg1
            nonexits





            share|improve this answer



















            • 1





              useful alternatives, thanks! The negative is I wouldn't be able to simple check my bundles had been installed from different scripts later on.

              – jenesaisquoi
              Jan 8 at 23:49













            • Yeah, it would be messy... Then I guess meta-packages are your best shot.

              – Ravexina
              Jan 8 at 23:54













            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2faskubuntu.com%2fquestions%2f1108150%2fgive-list-of-packages-installed-with-apt-a-name%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            The equivs package seems to do exactly what I wanted, very simply creating a .deb file that can be installed and queried using dpkg-query. See tutorial for walk-through.






            share|improve this answer




























              1














              The equivs package seems to do exactly what I wanted, very simply creating a .deb file that can be installed and queried using dpkg-query. See tutorial for walk-through.






              share|improve this answer


























                1












                1








                1







                The equivs package seems to do exactly what I wanted, very simply creating a .deb file that can be installed and queried using dpkg-query. See tutorial for walk-through.






                share|improve this answer













                The equivs package seems to do exactly what I wanted, very simply creating a .deb file that can be installed and queried using dpkg-query. See tutorial for walk-through.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 8 at 23:26









                jenesaisquoijenesaisquoi

                15010




                15010

























                    1














                    Beside using a meta package I would use a variable:



                    $ packages="coreutils wget"

                    $ dpkg-query -W $packages
                    coreutils 8.28-1ubuntu1
                    wget 1.19.4-1ubuntu2.1

                    $ echo $?
                    0


                    Means everything is fine (1) means something is missing.



                    Find a list of missing packages:



                    $ packages="coreutils wget 0ad pkg1 nonexits"
                    $ dpkg-query -W $packages 2>&1 > /dev/null | rev | cut -f1 -d' ' | rev
                    0ad
                    pkg1
                    nonexits





                    share|improve this answer



















                    • 1





                      useful alternatives, thanks! The negative is I wouldn't be able to simple check my bundles had been installed from different scripts later on.

                      – jenesaisquoi
                      Jan 8 at 23:49













                    • Yeah, it would be messy... Then I guess meta-packages are your best shot.

                      – Ravexina
                      Jan 8 at 23:54


















                    1














                    Beside using a meta package I would use a variable:



                    $ packages="coreutils wget"

                    $ dpkg-query -W $packages
                    coreutils 8.28-1ubuntu1
                    wget 1.19.4-1ubuntu2.1

                    $ echo $?
                    0


                    Means everything is fine (1) means something is missing.



                    Find a list of missing packages:



                    $ packages="coreutils wget 0ad pkg1 nonexits"
                    $ dpkg-query -W $packages 2>&1 > /dev/null | rev | cut -f1 -d' ' | rev
                    0ad
                    pkg1
                    nonexits





                    share|improve this answer



















                    • 1





                      useful alternatives, thanks! The negative is I wouldn't be able to simple check my bundles had been installed from different scripts later on.

                      – jenesaisquoi
                      Jan 8 at 23:49













                    • Yeah, it would be messy... Then I guess meta-packages are your best shot.

                      – Ravexina
                      Jan 8 at 23:54
















                    1












                    1








                    1







                    Beside using a meta package I would use a variable:



                    $ packages="coreutils wget"

                    $ dpkg-query -W $packages
                    coreutils 8.28-1ubuntu1
                    wget 1.19.4-1ubuntu2.1

                    $ echo $?
                    0


                    Means everything is fine (1) means something is missing.



                    Find a list of missing packages:



                    $ packages="coreutils wget 0ad pkg1 nonexits"
                    $ dpkg-query -W $packages 2>&1 > /dev/null | rev | cut -f1 -d' ' | rev
                    0ad
                    pkg1
                    nonexits





                    share|improve this answer













                    Beside using a meta package I would use a variable:



                    $ packages="coreutils wget"

                    $ dpkg-query -W $packages
                    coreutils 8.28-1ubuntu1
                    wget 1.19.4-1ubuntu2.1

                    $ echo $?
                    0


                    Means everything is fine (1) means something is missing.



                    Find a list of missing packages:



                    $ packages="coreutils wget 0ad pkg1 nonexits"
                    $ dpkg-query -W $packages 2>&1 > /dev/null | rev | cut -f1 -d' ' | rev
                    0ad
                    pkg1
                    nonexits






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 8 at 23:47









                    RavexinaRavexina

                    32.3k1483113




                    32.3k1483113








                    • 1





                      useful alternatives, thanks! The negative is I wouldn't be able to simple check my bundles had been installed from different scripts later on.

                      – jenesaisquoi
                      Jan 8 at 23:49













                    • Yeah, it would be messy... Then I guess meta-packages are your best shot.

                      – Ravexina
                      Jan 8 at 23:54
















                    • 1





                      useful alternatives, thanks! The negative is I wouldn't be able to simple check my bundles had been installed from different scripts later on.

                      – jenesaisquoi
                      Jan 8 at 23:49













                    • Yeah, it would be messy... Then I guess meta-packages are your best shot.

                      – Ravexina
                      Jan 8 at 23:54










                    1




                    1





                    useful alternatives, thanks! The negative is I wouldn't be able to simple check my bundles had been installed from different scripts later on.

                    – jenesaisquoi
                    Jan 8 at 23:49







                    useful alternatives, thanks! The negative is I wouldn't be able to simple check my bundles had been installed from different scripts later on.

                    – jenesaisquoi
                    Jan 8 at 23:49















                    Yeah, it would be messy... Then I guess meta-packages are your best shot.

                    – Ravexina
                    Jan 8 at 23:54







                    Yeah, it would be messy... Then I guess meta-packages are your best shot.

                    – Ravexina
                    Jan 8 at 23:54




















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f1108150%2fgive-list-of-packages-installed-with-apt-a-name%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

                    Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                    ComboBox Display Member on multiple fields

                    Is it possible to collect Nectar points via Trainline?