What do the various dpkg flags like 'ii' 'rc' mean?












84















I frequently need to check which packages are installed, and I use the following command:



dpkg -l | grep foo



which gives the following output



Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
ii foo <version> <description>



  1. What does the ii mean?

  2. What other flags are there?

  3. How to read the flags? (because the explanation is quite complicated, IMO)


Thanks.










share|improve this question



























    84















    I frequently need to check which packages are installed, and I use the following command:



    dpkg -l | grep foo



    which gives the following output



    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name Version Description
    ii foo <version> <description>



    1. What does the ii mean?

    2. What other flags are there?

    3. How to read the flags? (because the explanation is quite complicated, IMO)


    Thanks.










    share|improve this question

























      84












      84








      84


      44






      I frequently need to check which packages are installed, and I use the following command:



      dpkg -l | grep foo



      which gives the following output



      Desired=Unknown/Install/Remove/Purge/Hold
      | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name Version Description
      ii foo <version> <description>



      1. What does the ii mean?

      2. What other flags are there?

      3. How to read the flags? (because the explanation is quite complicated, IMO)


      Thanks.










      share|improve this question














      I frequently need to check which packages are installed, and I use the following command:



      dpkg -l | grep foo



      which gives the following output



      Desired=Unknown/Install/Remove/Purge/Hold
      | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name Version Description
      ii foo <version> <description>



      1. What does the ii mean?

      2. What other flags are there?

      3. How to read the flags? (because the explanation is quite complicated, IMO)


      Thanks.







      dpkg command-line






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 25 '10 at 9:02









      theTuxRacertheTuxRacer

      7,517156187




      7,517156187






















          4 Answers
          4






          active

          oldest

          votes


















          114














          Where to find this information in the system



          You can find this information out in the head of dpkg -l output, as it's just a formatting convention:



          dpkg -l | head -3


          Copied here for reference:



          Desired=Unknown/Install/Remove/Purge/Hold                                     
          | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
          |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)


          Description of each field



          As you can see from the first three lines:



          First letter -> desired package state ("selection state"):




          • u ... unknown

          • i ... install

          • r ... remove/deinstall

          • p ... purge (remove including config files)

          • h ... hold


          Second letter -> current package state:




          • n ... not-installed

          • i ... installed

          • c ... config-files (only the config files are installed)

          • U ... unpacked

          • F ... half-configured (configuration failed for some reason)

          • h ... half-installed (installation failed for some reason)

          • W ... triggers-awaited (package is waiting for a trigger from another package)

          • t ... triggers-pending (package has been triggered)


          Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):




          • R ... reinst-required (package broken, reinstallation required)






          share|improve this answer





















          • 2





            (The vertical bars and slashes in the second, third and fourth line of the header are "arrows" pointing to the first, second and third columns, to help you decipher what htorque has explained in greater depth.)

            – Ubuntourist
            Dec 25 '10 at 15:03













          • where can I read this list? I tried man dpkg but it was not there.

            – Fabrizio Regini
            Jan 9 '14 at 17:51











          • @FabrizioRegini Try again, it's right at the top of dpkg's man page (section "INFORMATION ABOUT PACKAGES"). :)

            – htorque
            Jan 13 '14 at 20:42











          • Where in the dpkg man page does it show the meaning of 'ii', 'if', and so on?

            – pmatulis
            May 28 '14 at 20:26











          • it's a formatting thing. thankfully the output itself makes it clear. I'll update the answer with details.

            – dpb
            May 30 '14 at 20:30



















          24














          The first letter displays what is the expected status of the package.

          The second letter displays what is the current status of the package.



          So for example:



          ii means 'It should be installed and it is installed' whereas
          rc means 'It's removed/uninstalled but it's configuration files are still there'






          share|improve this answer
























          • So is it safe to delete the configuration files of the kernel with rc tag?

            – Mars Lee
            Aug 27 '18 at 20:02



















          9














          Because my rep is low, I cannot comment to answer the questions people have about where to get this info. After reviewing source code for dpkg and related programs' main.c code, I found what I was looking for.



          The info for reading the -l | --list output is in



          man dpkg-query


          and not in



          man dpkg


          dpkg is merely acting as the front-end in these instances






          share|improve this answer































            1















            1. It means that the package is desired to be installed and that the package is installed.


            2. See man dpkg-query


            3. Upper case letters shown in the alternatives after equals sign in the three first lines in the legend are the letters possibly shown shown as the first three characters in the first field, respectively, but not all of them in the same case i.e some of the letters are shown in lower case. The third character is space normally.







            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',
              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%2f18804%2fwhat-do-the-various-dpkg-flags-like-ii-rc-mean%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              114














              Where to find this information in the system



              You can find this information out in the head of dpkg -l output, as it's just a formatting convention:



              dpkg -l | head -3


              Copied here for reference:



              Desired=Unknown/Install/Remove/Purge/Hold                                     
              | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
              |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)


              Description of each field



              As you can see from the first three lines:



              First letter -> desired package state ("selection state"):




              • u ... unknown

              • i ... install

              • r ... remove/deinstall

              • p ... purge (remove including config files)

              • h ... hold


              Second letter -> current package state:




              • n ... not-installed

              • i ... installed

              • c ... config-files (only the config files are installed)

              • U ... unpacked

              • F ... half-configured (configuration failed for some reason)

              • h ... half-installed (installation failed for some reason)

              • W ... triggers-awaited (package is waiting for a trigger from another package)

              • t ... triggers-pending (package has been triggered)


              Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):




              • R ... reinst-required (package broken, reinstallation required)






              share|improve this answer





















              • 2





                (The vertical bars and slashes in the second, third and fourth line of the header are "arrows" pointing to the first, second and third columns, to help you decipher what htorque has explained in greater depth.)

                – Ubuntourist
                Dec 25 '10 at 15:03













              • where can I read this list? I tried man dpkg but it was not there.

                – Fabrizio Regini
                Jan 9 '14 at 17:51











              • @FabrizioRegini Try again, it's right at the top of dpkg's man page (section "INFORMATION ABOUT PACKAGES"). :)

                – htorque
                Jan 13 '14 at 20:42











              • Where in the dpkg man page does it show the meaning of 'ii', 'if', and so on?

                – pmatulis
                May 28 '14 at 20:26











              • it's a formatting thing. thankfully the output itself makes it clear. I'll update the answer with details.

                – dpb
                May 30 '14 at 20:30
















              114














              Where to find this information in the system



              You can find this information out in the head of dpkg -l output, as it's just a formatting convention:



              dpkg -l | head -3


              Copied here for reference:



              Desired=Unknown/Install/Remove/Purge/Hold                                     
              | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
              |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)


              Description of each field



              As you can see from the first three lines:



              First letter -> desired package state ("selection state"):




              • u ... unknown

              • i ... install

              • r ... remove/deinstall

              • p ... purge (remove including config files)

              • h ... hold


              Second letter -> current package state:




              • n ... not-installed

              • i ... installed

              • c ... config-files (only the config files are installed)

              • U ... unpacked

              • F ... half-configured (configuration failed for some reason)

              • h ... half-installed (installation failed for some reason)

              • W ... triggers-awaited (package is waiting for a trigger from another package)

              • t ... triggers-pending (package has been triggered)


              Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):




              • R ... reinst-required (package broken, reinstallation required)






              share|improve this answer





















              • 2





                (The vertical bars and slashes in the second, third and fourth line of the header are "arrows" pointing to the first, second and third columns, to help you decipher what htorque has explained in greater depth.)

                – Ubuntourist
                Dec 25 '10 at 15:03













              • where can I read this list? I tried man dpkg but it was not there.

                – Fabrizio Regini
                Jan 9 '14 at 17:51











              • @FabrizioRegini Try again, it's right at the top of dpkg's man page (section "INFORMATION ABOUT PACKAGES"). :)

                – htorque
                Jan 13 '14 at 20:42











              • Where in the dpkg man page does it show the meaning of 'ii', 'if', and so on?

                – pmatulis
                May 28 '14 at 20:26











              • it's a formatting thing. thankfully the output itself makes it clear. I'll update the answer with details.

                – dpb
                May 30 '14 at 20:30














              114












              114








              114







              Where to find this information in the system



              You can find this information out in the head of dpkg -l output, as it's just a formatting convention:



              dpkg -l | head -3


              Copied here for reference:



              Desired=Unknown/Install/Remove/Purge/Hold                                     
              | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
              |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)


              Description of each field



              As you can see from the first three lines:



              First letter -> desired package state ("selection state"):




              • u ... unknown

              • i ... install

              • r ... remove/deinstall

              • p ... purge (remove including config files)

              • h ... hold


              Second letter -> current package state:




              • n ... not-installed

              • i ... installed

              • c ... config-files (only the config files are installed)

              • U ... unpacked

              • F ... half-configured (configuration failed for some reason)

              • h ... half-installed (installation failed for some reason)

              • W ... triggers-awaited (package is waiting for a trigger from another package)

              • t ... triggers-pending (package has been triggered)


              Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):




              • R ... reinst-required (package broken, reinstallation required)






              share|improve this answer















              Where to find this information in the system



              You can find this information out in the head of dpkg -l output, as it's just a formatting convention:



              dpkg -l | head -3


              Copied here for reference:



              Desired=Unknown/Install/Remove/Purge/Hold                                     
              | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
              |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)


              Description of each field



              As you can see from the first three lines:



              First letter -> desired package state ("selection state"):




              • u ... unknown

              • i ... install

              • r ... remove/deinstall

              • p ... purge (remove including config files)

              • h ... hold


              Second letter -> current package state:




              • n ... not-installed

              • i ... installed

              • c ... config-files (only the config files are installed)

              • U ... unpacked

              • F ... half-configured (configuration failed for some reason)

              • h ... half-installed (installation failed for some reason)

              • W ... triggers-awaited (package is waiting for a trigger from another package)

              • t ... triggers-pending (package has been triggered)


              Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):




              • R ... reinst-required (package broken, reinstallation required)







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 13 '17 at 9:21









              jarno

              1,80032048




              1,80032048










              answered Dec 25 '10 at 9:29









              htorquehtorque

              47.7k32175213




              47.7k32175213








              • 2





                (The vertical bars and slashes in the second, third and fourth line of the header are "arrows" pointing to the first, second and third columns, to help you decipher what htorque has explained in greater depth.)

                – Ubuntourist
                Dec 25 '10 at 15:03













              • where can I read this list? I tried man dpkg but it was not there.

                – Fabrizio Regini
                Jan 9 '14 at 17:51











              • @FabrizioRegini Try again, it's right at the top of dpkg's man page (section "INFORMATION ABOUT PACKAGES"). :)

                – htorque
                Jan 13 '14 at 20:42











              • Where in the dpkg man page does it show the meaning of 'ii', 'if', and so on?

                – pmatulis
                May 28 '14 at 20:26











              • it's a formatting thing. thankfully the output itself makes it clear. I'll update the answer with details.

                – dpb
                May 30 '14 at 20:30














              • 2





                (The vertical bars and slashes in the second, third and fourth line of the header are "arrows" pointing to the first, second and third columns, to help you decipher what htorque has explained in greater depth.)

                – Ubuntourist
                Dec 25 '10 at 15:03













              • where can I read this list? I tried man dpkg but it was not there.

                – Fabrizio Regini
                Jan 9 '14 at 17:51











              • @FabrizioRegini Try again, it's right at the top of dpkg's man page (section "INFORMATION ABOUT PACKAGES"). :)

                – htorque
                Jan 13 '14 at 20:42











              • Where in the dpkg man page does it show the meaning of 'ii', 'if', and so on?

                – pmatulis
                May 28 '14 at 20:26











              • it's a formatting thing. thankfully the output itself makes it clear. I'll update the answer with details.

                – dpb
                May 30 '14 at 20:30








              2




              2





              (The vertical bars and slashes in the second, third and fourth line of the header are "arrows" pointing to the first, second and third columns, to help you decipher what htorque has explained in greater depth.)

              – Ubuntourist
              Dec 25 '10 at 15:03







              (The vertical bars and slashes in the second, third and fourth line of the header are "arrows" pointing to the first, second and third columns, to help you decipher what htorque has explained in greater depth.)

              – Ubuntourist
              Dec 25 '10 at 15:03















              where can I read this list? I tried man dpkg but it was not there.

              – Fabrizio Regini
              Jan 9 '14 at 17:51





              where can I read this list? I tried man dpkg but it was not there.

              – Fabrizio Regini
              Jan 9 '14 at 17:51













              @FabrizioRegini Try again, it's right at the top of dpkg's man page (section "INFORMATION ABOUT PACKAGES"). :)

              – htorque
              Jan 13 '14 at 20:42





              @FabrizioRegini Try again, it's right at the top of dpkg's man page (section "INFORMATION ABOUT PACKAGES"). :)

              – htorque
              Jan 13 '14 at 20:42













              Where in the dpkg man page does it show the meaning of 'ii', 'if', and so on?

              – pmatulis
              May 28 '14 at 20:26





              Where in the dpkg man page does it show the meaning of 'ii', 'if', and so on?

              – pmatulis
              May 28 '14 at 20:26













              it's a formatting thing. thankfully the output itself makes it clear. I'll update the answer with details.

              – dpb
              May 30 '14 at 20:30





              it's a formatting thing. thankfully the output itself makes it clear. I'll update the answer with details.

              – dpb
              May 30 '14 at 20:30













              24














              The first letter displays what is the expected status of the package.

              The second letter displays what is the current status of the package.



              So for example:



              ii means 'It should be installed and it is installed' whereas
              rc means 'It's removed/uninstalled but it's configuration files are still there'






              share|improve this answer
























              • So is it safe to delete the configuration files of the kernel with rc tag?

                – Mars Lee
                Aug 27 '18 at 20:02
















              24














              The first letter displays what is the expected status of the package.

              The second letter displays what is the current status of the package.



              So for example:



              ii means 'It should be installed and it is installed' whereas
              rc means 'It's removed/uninstalled but it's configuration files are still there'






              share|improve this answer
























              • So is it safe to delete the configuration files of the kernel with rc tag?

                – Mars Lee
                Aug 27 '18 at 20:02














              24












              24








              24







              The first letter displays what is the expected status of the package.

              The second letter displays what is the current status of the package.



              So for example:



              ii means 'It should be installed and it is installed' whereas
              rc means 'It's removed/uninstalled but it's configuration files are still there'






              share|improve this answer













              The first letter displays what is the expected status of the package.

              The second letter displays what is the current status of the package.



              So for example:



              ii means 'It should be installed and it is installed' whereas
              rc means 'It's removed/uninstalled but it's configuration files are still there'







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Dec 25 '10 at 9:15









              Pavlos G.Pavlos G.

              7,39612733




              7,39612733













              • So is it safe to delete the configuration files of the kernel with rc tag?

                – Mars Lee
                Aug 27 '18 at 20:02



















              • So is it safe to delete the configuration files of the kernel with rc tag?

                – Mars Lee
                Aug 27 '18 at 20:02

















              So is it safe to delete the configuration files of the kernel with rc tag?

              – Mars Lee
              Aug 27 '18 at 20:02





              So is it safe to delete the configuration files of the kernel with rc tag?

              – Mars Lee
              Aug 27 '18 at 20:02











              9














              Because my rep is low, I cannot comment to answer the questions people have about where to get this info. After reviewing source code for dpkg and related programs' main.c code, I found what I was looking for.



              The info for reading the -l | --list output is in



              man dpkg-query


              and not in



              man dpkg


              dpkg is merely acting as the front-end in these instances






              share|improve this answer




























                9














                Because my rep is low, I cannot comment to answer the questions people have about where to get this info. After reviewing source code for dpkg and related programs' main.c code, I found what I was looking for.



                The info for reading the -l | --list output is in



                man dpkg-query


                and not in



                man dpkg


                dpkg is merely acting as the front-end in these instances






                share|improve this answer


























                  9












                  9








                  9







                  Because my rep is low, I cannot comment to answer the questions people have about where to get this info. After reviewing source code for dpkg and related programs' main.c code, I found what I was looking for.



                  The info for reading the -l | --list output is in



                  man dpkg-query


                  and not in



                  man dpkg


                  dpkg is merely acting as the front-end in these instances






                  share|improve this answer













                  Because my rep is low, I cannot comment to answer the questions people have about where to get this info. After reviewing source code for dpkg and related programs' main.c code, I found what I was looking for.



                  The info for reading the -l | --list output is in



                  man dpkg-query


                  and not in



                  man dpkg


                  dpkg is merely acting as the front-end in these instances







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 4 '15 at 18:20









                  Curtis MCurtis M

                  9111




                  9111























                      1















                      1. It means that the package is desired to be installed and that the package is installed.


                      2. See man dpkg-query


                      3. Upper case letters shown in the alternatives after equals sign in the three first lines in the legend are the letters possibly shown shown as the first three characters in the first field, respectively, but not all of them in the same case i.e some of the letters are shown in lower case. The third character is space normally.







                      share|improve this answer




























                        1















                        1. It means that the package is desired to be installed and that the package is installed.


                        2. See man dpkg-query


                        3. Upper case letters shown in the alternatives after equals sign in the three first lines in the legend are the letters possibly shown shown as the first three characters in the first field, respectively, but not all of them in the same case i.e some of the letters are shown in lower case. The third character is space normally.







                        share|improve this answer


























                          1












                          1








                          1








                          1. It means that the package is desired to be installed and that the package is installed.


                          2. See man dpkg-query


                          3. Upper case letters shown in the alternatives after equals sign in the three first lines in the legend are the letters possibly shown shown as the first three characters in the first field, respectively, but not all of them in the same case i.e some of the letters are shown in lower case. The third character is space normally.







                          share|improve this answer














                          1. It means that the package is desired to be installed and that the package is installed.


                          2. See man dpkg-query


                          3. Upper case letters shown in the alternatives after equals sign in the three first lines in the legend are the letters possibly shown shown as the first three characters in the first field, respectively, but not all of them in the same case i.e some of the letters are shown in lower case. The third character is space normally.








                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered May 13 '17 at 7:14









                          jarnojarno

                          1,80032048




                          1,80032048






























                              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%2f18804%2fwhat-do-the-various-dpkg-flags-like-ii-rc-mean%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

                              Category:香港粉麵

                              List *all* the tuples!

                              Channel [V]