I have a nifty server that does our updates by a specialized script. The problem is the main admin of this is part time and rarely here. I have Debian functioning as a device OS. When updates get applied I need to be able to see when they got applied on the device. I did a dpkg -l and it shows a lot besides that. We also checked the dpkg.log in /var/log and it only shows us the date when the updates were last installed.

  • 1
    Might want to examine/monitor /var/log/apt/history.log to see when what was installed
    – ivanivan
    May 22 '19 at 18:20
  • Nothing exists in the var/log/apt directory. How can I make sure that this gets created by my devices? May 23 '19 at 16:59
  • If your Debian is real pure Debian then all apt-get, etc. logs should be there. Of course, your log rotation, etc. can all effect this...
    – ivanivan
    May 23 '19 at 17:16

sudo apt-cache pkgnames | tee "$(date +"%Y-%m-%d")_pkg.log" provides a terser list, and you may compare it against the last time you ran it to see what's new.

  • Many thanks for a prompt answer. I do that I get the same output as sudo apt-cache pkgnames which is all the packages installed but with no dates. May 23 '19 at 17:04
  • Right. Run it every time there's an update. Then, you can compare it against the previous run (which is why I stuffed the ANSI formatted date into the logfile name in my example) and see what's new.
    – K7AAY
    May 23 '19 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.