5

Since using Linux mainly for developer purposes, I often encounter running various sudo apt-get commands downloading different tools.

These also install many dependency libraries.

Now is there a solution, through command-line or GUI, whereby it shows all apt-get commands executed for downloaded apps listing its required dependency tree?

That way it would be lovely to simply track what all stuff you did with your system.

Eliah Kagan
  • 119,640
arjun
  • 367
  • 3
  • 16

1 Answers1

7

TL;DR: Look in the package manager's logs, especially /var/log/apt/history.log.

To see what package management operations have been performed, I recommend consulting the APT and dpkg logs.

  • /var/log/apt/term.log shows the APT operations that have been performed. It is essentially the same text shown on the terminal when you run commands like apt-get, and date and timestamps are provided so it's clear when each operation was done.
  • /var/log/apt/history.log shows each package management operation performed by APT, who did it, what command was run to do it, and what packages and versions were affected. (This seems very similar to what you are asking for.)
  • /var/log/dpkg.log is the log for dpkg, which is the lower-level utility called by apt-get and other tools. It gives a list of operations on and statuses for each package that was added, removed, or modified, and the relevant versions.

To see the list of packages that a particular package needs (its dependencies), the packages that depend on it (its reverse dependencies), and some other information, you can run:

apt-cache showpkg package

Replace package with the actual name of the package.

Eliah Kagan
  • 119,640