When you use the apt command to install new packages or run routine upgrades on your Debian-based Linux system, you might wonder where information about your activities are being recorded. For one, your history file probably retains information on the commands that you use, though history files like ~/.bash_history will only keep the most recent commands that you’ve run — depending on your $HISTSIZE setting — and generally will not include dates and times. There is, however, another place to find information about apt commands and that place is /var/log/apt.
The /var/log/apt directory contains a number of log files — the history.log file, plus a series of older versions of the file named history.log.1.gz, history.log.2.gz, history.log.3,gz and so on. Each of these logs will contain information on apt commands that have been run within a particular timeframe.