To get the update history of a specific package assuming it was installed/updated via apt here's a oneliner (bash and zgrep), example is for package skypeforlinux:
package='skypeforlinux'; pregex="(${package}[^\)]+\))"; while read -r line; do [[ "$line" =~ ^Start-Date:[[:space:]]([[:digit:]].+) ]] && curdate="${BASH_REMATCH[1]} "; [[ "$line" =~ $pregex ]] && echo "$curdate ${BASH_REMATCH[1]}"; done < <(for i in `ls -tr /var/log/apt/history*`; do zgrep -B3 "$package" $i; done)
This greps apt's history log files for skypeforlinux including the previous three lines to get the date. Then iterates over the result and echoes the relevant dates and versions.
Replace the package variable value with your package name, even works for multiple packages provided they begin with same string.
All actions with apt (apt-get) are logged. These files are available in /var/log/apt/. To view the most recent history log, execute:
These logs gets rotated (every month I guess), old files will be suffixed with a number and compressed. So to view the next history log, use:
To view the logs available:
You can also make a short command to display the interesting content.
Add this custom function to your
~/.bashrc
:And call it in a terminal like this:
Taken from here
You can also use the following command to list recently installed packages
If you want those packages that were installed and not subsequently uninstalled, try this:
This is the installs minus any matching removes.
References:
comm
: https://stackoverflow.com/a/11963862/338303<(grep...)
syntax: https://unix.stackexchange.com/questions/73931/redirecting-multiple-commands-as-inputTo get the update history of a specific package assuming it was installed/updated via apt here's a oneliner (bash and zgrep), example is for package skypeforlinux:
This greps apt's history log files for skypeforlinux including the previous three lines to get the date. Then iterates over the result and echoes the relevant dates and versions.
Replace the package variable value with your package name, even works for multiple packages provided they begin with same string.
Example with output:
Here is how you actually do it, say package mutter:
Using dpkg.log captures operations that apt-get does not see.
Output: