I am trying to get package name with version, splitted package and version, vendor of that package, install time and date using:
dpkg-query -W -f='${Package}-${version} ${package} ${version} ${Maintainer} ${installtime}\n'
But I got package name with version, splitted package and version, vendor of that package. I was not able to retrieve install time and date.
How can I get package install time and date with the above query?
Best Answer
dpkg-query
does not have any field option to show date/time of installation. The other way of saying this is thatdpkg
does not store this information. Under the hood,dpkg-query
uses various files in/var/lib/dpkg/
to get the information.Here are the available field names:
And some virtual fields too:
Check
man dpkg-query
to get a broader idea.Note that, you can look at
/var/log/dpkg.log*
for the installation date/time of packages. Also note that, if your package is installed byapt-get
(or brothers), you can look at theapt
history files,/var/log/apt/history.log*
, too.