Is there an equivalent in Ubuntu to /var/log/yum.log in Redhat? [duplicate]
Redhat has a log you can look at after yum installs packages on your system. Is there an equivalent log to that in Ubuntu?
Solution 1:
On Ubuntu the high-level package manager is APT. There's a directory /var/log/apt
which contains
/var/log/apt/history.log
which lists APT commands, who ran them, and what was installed, upgraded or removed.
and
/var/log/apt/term.log
which logs the output of APT commands.
The lower level package manager is dpkg
. In the file
/var/log/dpkg.log
You can see package status updates made by dpkg
.
If a log is empty, it has been rotated. Look for files like dpkg.log.1
or a .gz
file (readable with zless
) - these are older logs.
Solution 2:
/var/log/apt
contains the log entries concerning packages installed by apt
on Ubuntu.
There are two sets of entries, history
, which shows a list of packages and the actions taken:
Start-Date: 2017-12-01 08:49:50
Upgrade: firefox-locale-en:amd64 (57.0+build4-0ubuntu0.14.04.5, 57.0.1+build2-0ubuntu0.14.04.1), thunderbird-locale-en-us:amd64 (52.4.0+build1-0ubuntu0.14.04.2, 52.5.0+build1-0ubuntu0.14.04.1), thunderbird:amd64 (52.4.0+build1-0ubuntu0.14.04.2, 52.5.0+build1-0ubuntu0.14.04.1), firefox:amd64 (57.0+build4-0ubuntu0.14.04.5, 57.0.1+build2-0ubuntu0.14.04.1), thunderbird-locale-en:amd64 (52.4.0+build1-0ubuntu0.14.04.2, 52.5.0+build1-0ubuntu0.14.04.1), thunderbird-gnome-support:amd64 (52.4.0+build1-0ubuntu0.14.04.2, 52.5.0+build1-0ubuntu0.14.04.1)
End-Date: 2017-12-01 08:50:21
and term
, which shows the output of the terminal commands that were processed.
Log started: 2017-12-01 08:49:50
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 330191 files and directories currently installed.)
Preparing to unpack .../firefox_57.0.1+build2-0ubuntu0.14.04.1_amd64.deb ...
Unpacking firefox (57.0.1+build2-0ubuntu0.14.04.1) over (57.0+build4-0ubuntu0.14.04.5) ...
Preparing to unpack .../firefox-locale-en_57.0.1+build2-0ubuntu0.14.04.1_amd64.deb ...
Unpacking firefox-locale-en (57.0.1+build2-0ubuntu0.14.04.1) over (57.0+build4-0ubuntu0.14.04.5) ...
Preparing to unpack .../thunderbird-locale-en_1%3a52.5.0+build1-0ubuntu0.14.04.1_amd64.deb ...
Unpacking thunderbird-locale-en (1:52.5.0+build1-0ubuntu0.14.04.1) over (1:52.4.0+build1-0ubuntu0.14.04.2) ...
Preparing to unpack .../thunderbird_1%3a52.5.0+build1-0ubuntu0.14.04.1_amd64.deb ...
Unpacking thunderbird (1:52.5.0+build1-0ubuntu0.14.04.1) over (1:52.4.0+build1-0ubuntu0.14.04.2) ...
Preparing to unpack .../thunderbird-gnome-support_1%3a52.5.0+build1-0ubuntu0.14.04.1_amd64.deb ...
Unpacking thunderbird-gnome-support (1:52.5.0+build1-0ubuntu0.14.04.1) over (1:52.4.0+build1-0ubuntu0.14.04.2) ...
Preparing to unpack .../thunderbird-locale-en-us_1%3a52.5.0+build1-0ubuntu0.14.04.1_all.deb ...
Unpacking thunderbird-locale-en-us (1:52.5.0+build1-0ubuntu0.14.04.1) over (1:52.4.0+build1-0ubuntu0.14.04.2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Setting up firefox (57.0.1+build2-0ubuntu0.14.04.1) ...
Please restart all running instances of firefox, or you will experience problems.
Setting up firefox-locale-en (57.0.1+build2-0ubuntu0.14.04.1) ...
Setting up thunderbird (1:52.5.0+build1-0ubuntu0.14.04.1) ...
Setting up thunderbird-locale-en (1:52.5.0+build1-0ubuntu0.14.04.1) ...
Setting up thunderbird-gnome-support (1:52.5.0+build1-0ubuntu0.14.04.1) ...
Setting up thunderbird-locale-en-us (1:52.5.0+build1-0ubuntu0.14.04.1) ...
Log ended: 2017-12-01 08:50:21
Solution 3:
Ubuntu and all other distributions from the Debian ecosystem use the package manager apt
instead of yum
.
Therefore, you can find its logs inside the directory /var/log/apt
.
Most important is the history.log
file in that location, which briefly logs all package operations (installed, upgraded, removed packages...). The other one is term.log
, which logs the complete terminal output of all apt
invocations.
Note that due to log rotation, old log files will be regularly (about once per month) compressed and renamed by appending an index number (and the compression ending .gz
), so that the highest number indicates the oldest compressed log. Example: history.log.3.gz