How to find out what version of Ubuntu was originally installed?

If you have not done manual modifications, you should see the utilised installation media on the top of /etc/apt/sources.list:

# deb cdrom:[Kubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100427)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

Apport (the Ubuntu bug reporter) uses /var/log/installer/media-info to determine the installation media which contains:

Kubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427)

This only works if you kept the /var/log/installer folder.


You can go to see older dpkg.log file available on the system, and take the older package reported on that:

less $(ls -rt /var/log/dpkg.log* | 
  head -1) | 
  awk 'NF == 6 && $3 == "install" { print $4, $6; exit }'

then go to http://packages.ubuntu.com/ and see to what release of ubuntu it belongs.

But this is not errors free, because older dpkg logs can be removed, depending on logrotate policy.

Tags:

Upgrade

Log