How can I list all files which will be installed by an APT package?

Multi tool use
Multi tool use

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











up vote
0
down vote

favorite
2












This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.



I wanted to list all files which will be installed by APT package xorg. In other words: all files which will be installed when I type apt install xorg. However, apt-file listed only the immediate files of xorg - not of its dependencies:



$ apt-file list xorg
xorg: /usr/share/bug/xorg/script
xorg: /usr/share/doc/xorg/changelog.gz
xorg: /usr/share/doc/xorg/copyright
xorg: /usr/share/lintian/overrides/xorg


How can I list all associated files?



(I will add an awful bash pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file and therefore very, very slow. I'm looking for a better answer.)







share|improve this question























    up vote
    0
    down vote

    favorite
    2












    This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.



    I wanted to list all files which will be installed by APT package xorg. In other words: all files which will be installed when I type apt install xorg. However, apt-file listed only the immediate files of xorg - not of its dependencies:



    $ apt-file list xorg
    xorg: /usr/share/bug/xorg/script
    xorg: /usr/share/doc/xorg/changelog.gz
    xorg: /usr/share/doc/xorg/copyright
    xorg: /usr/share/lintian/overrides/xorg


    How can I list all associated files?



    (I will add an awful bash pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file and therefore very, very slow. I'm looking for a better answer.)







    share|improve this question





















      up vote
      0
      down vote

      favorite
      2









      up vote
      0
      down vote

      favorite
      2






      2





      This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.



      I wanted to list all files which will be installed by APT package xorg. In other words: all files which will be installed when I type apt install xorg. However, apt-file listed only the immediate files of xorg - not of its dependencies:



      $ apt-file list xorg
      xorg: /usr/share/bug/xorg/script
      xorg: /usr/share/doc/xorg/changelog.gz
      xorg: /usr/share/doc/xorg/copyright
      xorg: /usr/share/lintian/overrides/xorg


      How can I list all associated files?



      (I will add an awful bash pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file and therefore very, very slow. I'm looking for a better answer.)







      share|improve this question











      This is similar to How can I generate a full listing of the files installed by a package? However, I haven't installed the package, yet.



      I wanted to list all files which will be installed by APT package xorg. In other words: all files which will be installed when I type apt install xorg. However, apt-file listed only the immediate files of xorg - not of its dependencies:



      $ apt-file list xorg
      xorg: /usr/share/bug/xorg/script
      xorg: /usr/share/doc/xorg/changelog.gz
      xorg: /usr/share/doc/xorg/copyright
      xorg: /usr/share/lintian/overrides/xorg


      How can I list all associated files?



      (I will add an awful bash pipe combination as an answer. This is what I'm using right now, but its just a loop with many calls to apt-file and therefore very, very slow. I'm looking for a better answer.)









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jun 21 at 0:11









      Jayjayyy

      1338




      1338




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          This is what I'm using right now, but it might be buggy and is definitely not very performant:



          apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort



          Step-by-step:



          Get list of packages which will be installed:



          apt-cache depends xorg


          Select the "depends" and "recommends" entries:



          grep '..(Depends|Recommends): [^<]'


          Strip everything except the package name:



          sed 's/[^:]*: //'


          If the line isn't empty, run apt-file with each package name:



          while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done


          apt-file list returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:



          sed 's/[^:]*: //'


          Sort lines:



          sort





          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: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f450999%2fhow-can-i-list-all-files-which-will-be-installed-by-an-apt-package%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













            This is what I'm using right now, but it might be buggy and is definitely not very performant:



            apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort



            Step-by-step:



            Get list of packages which will be installed:



            apt-cache depends xorg


            Select the "depends" and "recommends" entries:



            grep '..(Depends|Recommends): [^<]'


            Strip everything except the package name:



            sed 's/[^:]*: //'


            If the line isn't empty, run apt-file with each package name:



            while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done


            apt-file list returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:



            sed 's/[^:]*: //'


            Sort lines:



            sort





            share|improve this answer

























              up vote
              1
              down vote













              This is what I'm using right now, but it might be buggy and is definitely not very performant:



              apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort



              Step-by-step:



              Get list of packages which will be installed:



              apt-cache depends xorg


              Select the "depends" and "recommends" entries:



              grep '..(Depends|Recommends): [^<]'


              Strip everything except the package name:



              sed 's/[^:]*: //'


              If the line isn't empty, run apt-file with each package name:



              while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done


              apt-file list returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:



              sed 's/[^:]*: //'


              Sort lines:



              sort





              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote









                This is what I'm using right now, but it might be buggy and is definitely not very performant:



                apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort



                Step-by-step:



                Get list of packages which will be installed:



                apt-cache depends xorg


                Select the "depends" and "recommends" entries:



                grep '..(Depends|Recommends): [^<]'


                Strip everything except the package name:



                sed 's/[^:]*: //'


                If the line isn't empty, run apt-file with each package name:



                while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done


                apt-file list returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:



                sed 's/[^:]*: //'


                Sort lines:



                sort





                share|improve this answer













                This is what I'm using right now, but it might be buggy and is definitely not very performant:



                apt-cache depends xorg | grep '..(Depends|Recommends): [^<]' | sed 's/[^:]*: //' | while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done | sed 's/[^:]*: //' | sort



                Step-by-step:



                Get list of packages which will be installed:



                apt-cache depends xorg


                Select the "depends" and "recommends" entries:



                grep '..(Depends|Recommends): [^<]'


                Strip everything except the package name:



                sed 's/[^:]*: //'


                If the line isn't empty, run apt-file with each package name:



                while read LINE; do [[ -z "$LINE" ]] || apt-file list "$LINE"; done


                apt-file list returns lines where each line begins with the corresponding package name for the file. Remove package name from line, which leaves only the filename:



                sed 's/[^:]*: //'


                Sort lines:



                sort






                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Jun 21 at 0:12









                Jayjayyy

                1338




                1338






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f450999%2fhow-can-i-list-all-files-which-will-be-installed-by-an-apt-package%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    mVuNGqFZE6EVRlq9r yYC7KJT2D7paaWAV6MIFnCCuJoa,3W7sbZ1jOQYFBQIRImPMKgs,gAS
                    CggnIK G0smpgrD 0dK 8JhrzkE HFO4x,D8

                    Popular posts from this blog

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

                    How many registers does an x86_64 CPU actually have?

                    Displaying single band from multi-band raster using QGIS