How can I get a log of the updates I installed recently?












0














I want to get a log of the updates I installed in my Ubuntu 18.04 recently (say last month) using apt-get upgrade and apt-get update. Is there any way?










share|improve this question


















  • 1




    See /var/log/apt/history.log and the *.gz files therein.
    – PerlDuck
    Dec 9 at 17:39












  • It shows only this month. What if I want last month (Nov.)?
    – user9371654
    Dec 9 at 17:41










  • Look into the *.gz files. See my answer below.
    – PerlDuck
    Dec 9 at 18:24












  • See also serverfault.com/questions/175504/…
    – whamalai
    Dec 9 at 20:17
















0














I want to get a log of the updates I installed in my Ubuntu 18.04 recently (say last month) using apt-get upgrade and apt-get update. Is there any way?










share|improve this question


















  • 1




    See /var/log/apt/history.log and the *.gz files therein.
    – PerlDuck
    Dec 9 at 17:39












  • It shows only this month. What if I want last month (Nov.)?
    – user9371654
    Dec 9 at 17:41










  • Look into the *.gz files. See my answer below.
    – PerlDuck
    Dec 9 at 18:24












  • See also serverfault.com/questions/175504/…
    – whamalai
    Dec 9 at 20:17














0












0








0


1





I want to get a log of the updates I installed in my Ubuntu 18.04 recently (say last month) using apt-get upgrade and apt-get update. Is there any way?










share|improve this question













I want to get a log of the updates I installed in my Ubuntu 18.04 recently (say last month) using apt-get upgrade and apt-get update. Is there any way?







18.04 upgrade updates






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 9 at 17:32









user9371654

1697




1697








  • 1




    See /var/log/apt/history.log and the *.gz files therein.
    – PerlDuck
    Dec 9 at 17:39












  • It shows only this month. What if I want last month (Nov.)?
    – user9371654
    Dec 9 at 17:41










  • Look into the *.gz files. See my answer below.
    – PerlDuck
    Dec 9 at 18:24












  • See also serverfault.com/questions/175504/…
    – whamalai
    Dec 9 at 20:17














  • 1




    See /var/log/apt/history.log and the *.gz files therein.
    – PerlDuck
    Dec 9 at 17:39












  • It shows only this month. What if I want last month (Nov.)?
    – user9371654
    Dec 9 at 17:41










  • Look into the *.gz files. See my answer below.
    – PerlDuck
    Dec 9 at 18:24












  • See also serverfault.com/questions/175504/…
    – whamalai
    Dec 9 at 20:17








1




1




See /var/log/apt/history.log and the *.gz files therein.
– PerlDuck
Dec 9 at 17:39






See /var/log/apt/history.log and the *.gz files therein.
– PerlDuck
Dec 9 at 17:39














It shows only this month. What if I want last month (Nov.)?
– user9371654
Dec 9 at 17:41




It shows only this month. What if I want last month (Nov.)?
– user9371654
Dec 9 at 17:41












Look into the *.gz files. See my answer below.
– PerlDuck
Dec 9 at 18:24






Look into the *.gz files. See my answer below.
– PerlDuck
Dec 9 at 18:24














See also serverfault.com/questions/175504/…
– whamalai
Dec 9 at 20:17




See also serverfault.com/questions/175504/…
– whamalai
Dec 9 at 20:17










2 Answers
2






active

oldest

votes


















3














The history of the commands apt, apt-get and the like is stored
in the directory /var/log/apt in the file history.log:



pduck@host > cd /var/log/apt
pduck@host > ls -l history*
-rw-r--r-- 1 root root 3312 Dez 8 16:10 history.log
-rw-r--r-- 1 root root 3863 Mär 2 2018 history.log.10.gz
-rw-r--r-- 1 root root 28259 Feb 2 2018 history.log.11.gz
-rw-r--r-- 1 root root 3994 Nov 29 20:21 history.log.1.gz
-rw-r--r-- 1 root root 1618 Nov 2 19:06 history.log.2.gz
-rw-r--r-- 1 root root 421 Sep 22 14:03 history.log.3.gz
-rw-r--r-- 1 root root 908 Aug 31 16:06 history.log.4.gz
-rw-r--r-- 1 root root 1654 Jul 29 12:22 history.log.5.gz
-rw-r--r-- 1 root root 2298 Jun 30 18:34 history.log.6.gz
-rw-r--r-- 1 root root 2227 Jun 1 2018 history.log.7.gz
-rw-r--r-- 1 root root 2438 Apr 28 2018 history.log.8.gz
-rw-r--r-- 1 root root 4369 Mär 31 2018 history.log.9.gz


The file history.log is the current logfile. It gets rotated
by the logrotate job in /etc/logrotate.d/apt once a month and
kept for 12 months:



/var/log/apt/history.log {
rotate 12
monthly
compress
missingok
notifempty
}


To view logs from previous months look into the *.N.gz files,
e.g.:



zless /var/log/apt/history.log.1.gz


(No need to unzip them first, zless (and zgrep) does this under the hood.)






share|improve this answer































    1














    Another route is to examine /var/log/dpkg.log and its archives:



    zgrep "2018-11.* status installed" /var/log/dpkg.log* | sort -t- -k2 -r


    Notes:




    • This command will also include packages that were already installed on your system but updated in the month of November 2018. Change 2018-11 to whatever other period you wish to examine.

    • You can increase the number of archives saved on your system by following https://askubuntu.com/a/421072/248158.






    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%2f1099607%2fhow-can-i-get-a-log-of-the-updates-i-installed-recently%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









      3














      The history of the commands apt, apt-get and the like is stored
      in the directory /var/log/apt in the file history.log:



      pduck@host > cd /var/log/apt
      pduck@host > ls -l history*
      -rw-r--r-- 1 root root 3312 Dez 8 16:10 history.log
      -rw-r--r-- 1 root root 3863 Mär 2 2018 history.log.10.gz
      -rw-r--r-- 1 root root 28259 Feb 2 2018 history.log.11.gz
      -rw-r--r-- 1 root root 3994 Nov 29 20:21 history.log.1.gz
      -rw-r--r-- 1 root root 1618 Nov 2 19:06 history.log.2.gz
      -rw-r--r-- 1 root root 421 Sep 22 14:03 history.log.3.gz
      -rw-r--r-- 1 root root 908 Aug 31 16:06 history.log.4.gz
      -rw-r--r-- 1 root root 1654 Jul 29 12:22 history.log.5.gz
      -rw-r--r-- 1 root root 2298 Jun 30 18:34 history.log.6.gz
      -rw-r--r-- 1 root root 2227 Jun 1 2018 history.log.7.gz
      -rw-r--r-- 1 root root 2438 Apr 28 2018 history.log.8.gz
      -rw-r--r-- 1 root root 4369 Mär 31 2018 history.log.9.gz


      The file history.log is the current logfile. It gets rotated
      by the logrotate job in /etc/logrotate.d/apt once a month and
      kept for 12 months:



      /var/log/apt/history.log {
      rotate 12
      monthly
      compress
      missingok
      notifempty
      }


      To view logs from previous months look into the *.N.gz files,
      e.g.:



      zless /var/log/apt/history.log.1.gz


      (No need to unzip them first, zless (and zgrep) does this under the hood.)






      share|improve this answer




























        3














        The history of the commands apt, apt-get and the like is stored
        in the directory /var/log/apt in the file history.log:



        pduck@host > cd /var/log/apt
        pduck@host > ls -l history*
        -rw-r--r-- 1 root root 3312 Dez 8 16:10 history.log
        -rw-r--r-- 1 root root 3863 Mär 2 2018 history.log.10.gz
        -rw-r--r-- 1 root root 28259 Feb 2 2018 history.log.11.gz
        -rw-r--r-- 1 root root 3994 Nov 29 20:21 history.log.1.gz
        -rw-r--r-- 1 root root 1618 Nov 2 19:06 history.log.2.gz
        -rw-r--r-- 1 root root 421 Sep 22 14:03 history.log.3.gz
        -rw-r--r-- 1 root root 908 Aug 31 16:06 history.log.4.gz
        -rw-r--r-- 1 root root 1654 Jul 29 12:22 history.log.5.gz
        -rw-r--r-- 1 root root 2298 Jun 30 18:34 history.log.6.gz
        -rw-r--r-- 1 root root 2227 Jun 1 2018 history.log.7.gz
        -rw-r--r-- 1 root root 2438 Apr 28 2018 history.log.8.gz
        -rw-r--r-- 1 root root 4369 Mär 31 2018 history.log.9.gz


        The file history.log is the current logfile. It gets rotated
        by the logrotate job in /etc/logrotate.d/apt once a month and
        kept for 12 months:



        /var/log/apt/history.log {
        rotate 12
        monthly
        compress
        missingok
        notifempty
        }


        To view logs from previous months look into the *.N.gz files,
        e.g.:



        zless /var/log/apt/history.log.1.gz


        (No need to unzip them first, zless (and zgrep) does this under the hood.)






        share|improve this answer


























          3












          3








          3






          The history of the commands apt, apt-get and the like is stored
          in the directory /var/log/apt in the file history.log:



          pduck@host > cd /var/log/apt
          pduck@host > ls -l history*
          -rw-r--r-- 1 root root 3312 Dez 8 16:10 history.log
          -rw-r--r-- 1 root root 3863 Mär 2 2018 history.log.10.gz
          -rw-r--r-- 1 root root 28259 Feb 2 2018 history.log.11.gz
          -rw-r--r-- 1 root root 3994 Nov 29 20:21 history.log.1.gz
          -rw-r--r-- 1 root root 1618 Nov 2 19:06 history.log.2.gz
          -rw-r--r-- 1 root root 421 Sep 22 14:03 history.log.3.gz
          -rw-r--r-- 1 root root 908 Aug 31 16:06 history.log.4.gz
          -rw-r--r-- 1 root root 1654 Jul 29 12:22 history.log.5.gz
          -rw-r--r-- 1 root root 2298 Jun 30 18:34 history.log.6.gz
          -rw-r--r-- 1 root root 2227 Jun 1 2018 history.log.7.gz
          -rw-r--r-- 1 root root 2438 Apr 28 2018 history.log.8.gz
          -rw-r--r-- 1 root root 4369 Mär 31 2018 history.log.9.gz


          The file history.log is the current logfile. It gets rotated
          by the logrotate job in /etc/logrotate.d/apt once a month and
          kept for 12 months:



          /var/log/apt/history.log {
          rotate 12
          monthly
          compress
          missingok
          notifempty
          }


          To view logs from previous months look into the *.N.gz files,
          e.g.:



          zless /var/log/apt/history.log.1.gz


          (No need to unzip them first, zless (and zgrep) does this under the hood.)






          share|improve this answer














          The history of the commands apt, apt-get and the like is stored
          in the directory /var/log/apt in the file history.log:



          pduck@host > cd /var/log/apt
          pduck@host > ls -l history*
          -rw-r--r-- 1 root root 3312 Dez 8 16:10 history.log
          -rw-r--r-- 1 root root 3863 Mär 2 2018 history.log.10.gz
          -rw-r--r-- 1 root root 28259 Feb 2 2018 history.log.11.gz
          -rw-r--r-- 1 root root 3994 Nov 29 20:21 history.log.1.gz
          -rw-r--r-- 1 root root 1618 Nov 2 19:06 history.log.2.gz
          -rw-r--r-- 1 root root 421 Sep 22 14:03 history.log.3.gz
          -rw-r--r-- 1 root root 908 Aug 31 16:06 history.log.4.gz
          -rw-r--r-- 1 root root 1654 Jul 29 12:22 history.log.5.gz
          -rw-r--r-- 1 root root 2298 Jun 30 18:34 history.log.6.gz
          -rw-r--r-- 1 root root 2227 Jun 1 2018 history.log.7.gz
          -rw-r--r-- 1 root root 2438 Apr 28 2018 history.log.8.gz
          -rw-r--r-- 1 root root 4369 Mär 31 2018 history.log.9.gz


          The file history.log is the current logfile. It gets rotated
          by the logrotate job in /etc/logrotate.d/apt once a month and
          kept for 12 months:



          /var/log/apt/history.log {
          rotate 12
          monthly
          compress
          missingok
          notifempty
          }


          To view logs from previous months look into the *.N.gz files,
          e.g.:



          zless /var/log/apt/history.log.1.gz


          (No need to unzip them first, zless (and zgrep) does this under the hood.)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 9 at 18:29

























          answered Dec 9 at 18:23









          PerlDuck

          5,17911231




          5,17911231

























              1














              Another route is to examine /var/log/dpkg.log and its archives:



              zgrep "2018-11.* status installed" /var/log/dpkg.log* | sort -t- -k2 -r


              Notes:




              • This command will also include packages that were already installed on your system but updated in the month of November 2018. Change 2018-11 to whatever other period you wish to examine.

              • You can increase the number of archives saved on your system by following https://askubuntu.com/a/421072/248158.






              share|improve this answer


























                1














                Another route is to examine /var/log/dpkg.log and its archives:



                zgrep "2018-11.* status installed" /var/log/dpkg.log* | sort -t- -k2 -r


                Notes:




                • This command will also include packages that were already installed on your system but updated in the month of November 2018. Change 2018-11 to whatever other period you wish to examine.

                • You can increase the number of archives saved on your system by following https://askubuntu.com/a/421072/248158.






                share|improve this answer
























                  1












                  1








                  1






                  Another route is to examine /var/log/dpkg.log and its archives:



                  zgrep "2018-11.* status installed" /var/log/dpkg.log* | sort -t- -k2 -r


                  Notes:




                  • This command will also include packages that were already installed on your system but updated in the month of November 2018. Change 2018-11 to whatever other period you wish to examine.

                  • You can increase the number of archives saved on your system by following https://askubuntu.com/a/421072/248158.






                  share|improve this answer












                  Another route is to examine /var/log/dpkg.log and its archives:



                  zgrep "2018-11.* status installed" /var/log/dpkg.log* | sort -t- -k2 -r


                  Notes:




                  • This command will also include packages that were already installed on your system but updated in the month of November 2018. Change 2018-11 to whatever other period you wish to examine.

                  • You can increase the number of archives saved on your system by following https://askubuntu.com/a/421072/248158.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 10 at 5:47









                  DK Bose

                  12.9k123983




                  12.9k123983






























                      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%2f1099607%2fhow-can-i-get-a-log-of-the-updates-i-installed-recently%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

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                      Eduardo VII do Reino Unido