Skip to content

Package manager logs

Package installations, updates, and removals are logged by the server’s package manager.

View the logs

A server’s package manager logs can be viewed from within the ServerPilot dashboard or through SSH.

Log file location

The package manager log is located at:

/var/log/apt/history.log

Log file format

There are multiple lines in each log entry in the package manager logs. The format of each entry is:

Start-Date: START_DATE
Commandline: COMMAND
Install: PACKAGE:amd64 (INSTALL_VERSION), ...
Upgrade: PACKAGE:amd64 (UPGRADE_OLD_VERSION, UPGRADE_NEW_VERSION), ...
Remove: PACKAGE:amd64 (REMOVE_VERSION), ...
End-Date: END_DATE

For each of the lines beginning with Install:, Upgrade:, and Remove:, the line will only be present if the operation was performed on at least one package.

The fields in each log entry are described in the following table.

FieldDescription
START_DATEThe date and time when the package management operation began.
COMMANDThe command that initiated the package management operation.
PACKAGEThe name of a package that was installed, upgraded, or removed.
INSTALL_VERSIONThe version of a package that was installed. For a package installed as dependency of another package, the version will be followed by , automatic.
UPGRADE_OLD_VERSIONThe previous version of a package that was upgraded.
UPGRADE_NEW_VERSIONThe new version of a package that was upgraded.
REMOVE_VERSIONThe version of a package that was removed.
END_DATEThe date and time when the package management operation ended.

When the package manager is invoked multiple times such as during daily automated package updates, there will be multiple log entries produced.

The example below shows Linux kernel packages being updated during daily automated package updates.

Start-Date: 2025-03-06 06:28:47
Commandline: /usr/bin/unattended-upgrade
Install: linux-modules-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-image-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-headers-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-tools-6.8.0-55:amd64 (6.8.0-55.57, automatic), linux-tools-6.8.0-55-generic:amd64 (6.8.0-55.57, automatic), linux-headers-6.8.0-55:amd64 (6.8.0-55.57, automatic)
Upgrade: linux-tools-common:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-virtual:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-headers-generic:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-image-virtual:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-headers-virtual:amd64 (6.8.0-54.56, 6.8.0-55.57), linux-libc-dev:amd64 (6.8.0-54.56, 6.8.0-55.57)
End-Date: 2025-03-06 06:29:06
Start-Date: 2025-03-06 06:29:12
Commandline: /usr/bin/unattended-upgrade
Remove: linux-modules-6.8.0-54-generic:amd64 (6.8.0-54.56), linux-image-6.8.0-54-generic:amd64 (6.8.0-54.56)
End-Date: 2025-03-06 06:29:14
Start-Date: 2025-03-06 06:29:18
Commandline: /usr/bin/unattended-upgrade
Remove: linux-tools-6.8.0-54:amd64 (6.8.0-54.56), linux-tools-6.8.0-54-generic:amd64 (6.8.0-54.56)
End-Date: 2025-03-06 06:29:19
Start-Date: 2025-03-06 06:29:23
Commandline: /usr/bin/unattended-upgrade
Remove: linux-headers-6.8.0-54-generic:amd64 (6.8.0-54.56), linux-headers-6.8.0-54:amd64 (6.8.0-54.56)
End-Date: 2025-03-06 06:29:25

Example commands

You must be logged in as root to view the package manager logs.

View recent package manager log entries

Show the most recent 100 lines in the package manager log.

Terminal window
sudo tail -n 100 /var/log/apt/history.log