[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How To determine the date the system & packages were installed.



On Fri, 29 Jan 2010 21:14:30 -0500 (EST), Mike Iowa wrote:
> I have done extensive searches and have found no answers for finding out the
> following information from Debian systems.
> 
> 1. I would like to be able to tell when a package was installed.
> 2. I would also like to be able to look at (any) Debian or Debian-based
> system and tell when the operating system was originally installed.
> 
> If this is not possible (as I have been told thus far) that is fine.
> However, if there is a way it needs to work on most every Debian system and
> to not require special packages to have been installed.
> In addition I have found that there are some systems that have log files
> such as /var/log/base-config.log.1 (Deb 3.1) that were created when the
> system was installed and even have captures of the installation
> screens, but this is not uniform across Debian versions (none of my Deb 4.0
> have it).
> 
> Preferably it would work with the base installation of any Debian system. I
> would like it to be more concrete than a file or directory listing. Given
> that can change for any
> number of reasons.

Well, I'm far from an expert on this, Mike, but just in poking around in the
files on my system for the last half hour, this is what I've come up with.
There are files on the system of the form /var/log/dpkg.*
The newest one is called dpkg.log, the one before that is called dpkg.log.1,
and the ones before that are called dpkg.log.2.gz, dpkg.log.3.gz, etc.
If they are all still there, the oldest one would tell you when the system
was installed.  However, I believe that a cron job somewhere is programmed
to keep only so many of these files.  Eventually, the oldest one will be
deleted.  If you still have the oldest one, it will say

   startup archives install
   install base-files <none> 5.0.0

(or something along those lines) in the first two records.  There are date
and time stamps for every state transition of every package along the way.
They are in chronological order, except that you may see the effects of
a time zone change after locales is installed.  For example, I have my
system clock set to GMT.  The entries prior to locales are in GMT.
After locales is installed, they revert to local time.  All package
installation methods (synaptic, aptitude, apt, etc., eventually filter
down to a dpkg command; so this would appear to capture it all.

Hope this helps.


Reply to: