How to get a list of all pending security updates?












7














I need to list (not count or install) all pending security updates on an Ubuntu 14.04 system. I've read the post How to create a list of of only security updates with apt-get? and its accepted answer (apt-show-versions | grep upgradeable | grep security) does indeed give me a list.



However, that command lists 62 pending security updates. /usr/lib/update-notifier/apt-check tells me that I have 75 pending security updates, but doesn't seem to have a way to list them. How can I reconcile these two numbers? Is one of the two commands doing something other than what I want?










share|improve this question



























    7














    I need to list (not count or install) all pending security updates on an Ubuntu 14.04 system. I've read the post How to create a list of of only security updates with apt-get? and its accepted answer (apt-show-versions | grep upgradeable | grep security) does indeed give me a list.



    However, that command lists 62 pending security updates. /usr/lib/update-notifier/apt-check tells me that I have 75 pending security updates, but doesn't seem to have a way to list them. How can I reconcile these two numbers? Is one of the two commands doing something other than what I want?










    share|improve this question

























      7












      7








      7


      1





      I need to list (not count or install) all pending security updates on an Ubuntu 14.04 system. I've read the post How to create a list of of only security updates with apt-get? and its accepted answer (apt-show-versions | grep upgradeable | grep security) does indeed give me a list.



      However, that command lists 62 pending security updates. /usr/lib/update-notifier/apt-check tells me that I have 75 pending security updates, but doesn't seem to have a way to list them. How can I reconcile these two numbers? Is one of the two commands doing something other than what I want?










      share|improve this question













      I need to list (not count or install) all pending security updates on an Ubuntu 14.04 system. I've read the post How to create a list of of only security updates with apt-get? and its accepted answer (apt-show-versions | grep upgradeable | grep security) does indeed give me a list.



      However, that command lists 62 pending security updates. /usr/lib/update-notifier/apt-check tells me that I have 75 pending security updates, but doesn't seem to have a way to list them. How can I reconcile these two numbers? Is one of the two commands doing something other than what I want?







      apt updates






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 19 '16 at 17:45









      user3553031

      14616




      14616






















          3 Answers
          3






          active

          oldest

          votes


















          6














          If you are just looking to do this quickly once, instead of creating a separate repository and scripting up some automation and all that. Great if you aren't supposed to be making changes while auditing a system or whatever.



          These two commands will spit out the list. Pipe to wc -l to see how many are behind. ;-)



          grep security /etc/apt/sources.list > /tmp/security.list
          sudo apt-get upgrade -oDir::Etc::Sourcelist=/tmp/security.list -oDir::Etc::SourceParts=/some/valid/dir/false -s


          Still valid for older distros or if you have update repos off, but security on:



          sudo apt-get upgrade -s| grep ^Inst |grep Security 





          share|improve this answer































            2














            This worked for me:



            sudo unattended-upgrade --dry-run -d 2> /dev/null | awk '/Checking/ { print $2 }'





            share|improve this answer























            • Shows all available updates, but doesnt limit to security-updates if i'm not mistaken. Still helpful.
              – delf
              Aug 27 at 14:04



















            0














            sudo apt list --upgradable |grep "/$(lsb_release -cs)-security"


            This lists all available updates which come via the security repository.






            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%2f774805%2fhow-to-get-a-list-of-all-pending-security-updates%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              6














              If you are just looking to do this quickly once, instead of creating a separate repository and scripting up some automation and all that. Great if you aren't supposed to be making changes while auditing a system or whatever.



              These two commands will spit out the list. Pipe to wc -l to see how many are behind. ;-)



              grep security /etc/apt/sources.list > /tmp/security.list
              sudo apt-get upgrade -oDir::Etc::Sourcelist=/tmp/security.list -oDir::Etc::SourceParts=/some/valid/dir/false -s


              Still valid for older distros or if you have update repos off, but security on:



              sudo apt-get upgrade -s| grep ^Inst |grep Security 





              share|improve this answer




























                6














                If you are just looking to do this quickly once, instead of creating a separate repository and scripting up some automation and all that. Great if you aren't supposed to be making changes while auditing a system or whatever.



                These two commands will spit out the list. Pipe to wc -l to see how many are behind. ;-)



                grep security /etc/apt/sources.list > /tmp/security.list
                sudo apt-get upgrade -oDir::Etc::Sourcelist=/tmp/security.list -oDir::Etc::SourceParts=/some/valid/dir/false -s


                Still valid for older distros or if you have update repos off, but security on:



                sudo apt-get upgrade -s| grep ^Inst |grep Security 





                share|improve this answer


























                  6












                  6








                  6






                  If you are just looking to do this quickly once, instead of creating a separate repository and scripting up some automation and all that. Great if you aren't supposed to be making changes while auditing a system or whatever.



                  These two commands will spit out the list. Pipe to wc -l to see how many are behind. ;-)



                  grep security /etc/apt/sources.list > /tmp/security.list
                  sudo apt-get upgrade -oDir::Etc::Sourcelist=/tmp/security.list -oDir::Etc::SourceParts=/some/valid/dir/false -s


                  Still valid for older distros or if you have update repos off, but security on:



                  sudo apt-get upgrade -s| grep ^Inst |grep Security 





                  share|improve this answer














                  If you are just looking to do this quickly once, instead of creating a separate repository and scripting up some automation and all that. Great if you aren't supposed to be making changes while auditing a system or whatever.



                  These two commands will spit out the list. Pipe to wc -l to see how many are behind. ;-)



                  grep security /etc/apt/sources.list > /tmp/security.list
                  sudo apt-get upgrade -oDir::Etc::Sourcelist=/tmp/security.list -oDir::Etc::SourceParts=/some/valid/dir/false -s


                  Still valid for older distros or if you have update repos off, but security on:



                  sudo apt-get upgrade -s| grep ^Inst |grep Security 






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 20 at 9:37









                  Piloos

                  32




                  32










                  answered Nov 4 '16 at 21:10









                  flickerfly

                  4,72762043




                  4,72762043

























                      2














                      This worked for me:



                      sudo unattended-upgrade --dry-run -d 2> /dev/null | awk '/Checking/ { print $2 }'





                      share|improve this answer























                      • Shows all available updates, but doesnt limit to security-updates if i'm not mistaken. Still helpful.
                        – delf
                        Aug 27 at 14:04
















                      2














                      This worked for me:



                      sudo unattended-upgrade --dry-run -d 2> /dev/null | awk '/Checking/ { print $2 }'





                      share|improve this answer























                      • Shows all available updates, but doesnt limit to security-updates if i'm not mistaken. Still helpful.
                        – delf
                        Aug 27 at 14:04














                      2












                      2








                      2






                      This worked for me:



                      sudo unattended-upgrade --dry-run -d 2> /dev/null | awk '/Checking/ { print $2 }'





                      share|improve this answer














                      This worked for me:



                      sudo unattended-upgrade --dry-run -d 2> /dev/null | awk '/Checking/ { print $2 }'






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 3 '17 at 12:44









                      David Foerster

                      27.8k1364109




                      27.8k1364109










                      answered Nov 3 '17 at 12:23









                      Samuel James

                      1212




                      1212












                      • Shows all available updates, but doesnt limit to security-updates if i'm not mistaken. Still helpful.
                        – delf
                        Aug 27 at 14:04


















                      • Shows all available updates, but doesnt limit to security-updates if i'm not mistaken. Still helpful.
                        – delf
                        Aug 27 at 14:04
















                      Shows all available updates, but doesnt limit to security-updates if i'm not mistaken. Still helpful.
                      – delf
                      Aug 27 at 14:04




                      Shows all available updates, but doesnt limit to security-updates if i'm not mistaken. Still helpful.
                      – delf
                      Aug 27 at 14:04











                      0














                      sudo apt list --upgradable |grep "/$(lsb_release -cs)-security"


                      This lists all available updates which come via the security repository.






                      share|improve this answer


























                        0














                        sudo apt list --upgradable |grep "/$(lsb_release -cs)-security"


                        This lists all available updates which come via the security repository.






                        share|improve this answer
























                          0












                          0








                          0






                          sudo apt list --upgradable |grep "/$(lsb_release -cs)-security"


                          This lists all available updates which come via the security repository.






                          share|improve this answer












                          sudo apt list --upgradable |grep "/$(lsb_release -cs)-security"


                          This lists all available updates which come via the security repository.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 30 at 12:02









                          zerwas

                          3,32311618




                          3,32311618






























                              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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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%2f774805%2fhow-to-get-a-list-of-all-pending-security-updates%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 change which sound is reproduced for terminal bell?

                              Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                              Can I use Tabulator js library in my java Spring + Thymeleaf project?