Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way or maybe even a command to check out if the installation has been upgraded from previous versions? I have some servers that I know have been upgraded from for instance 8.04 to 12.04 and are having issues to be upgraded to 14.04 and would like to find out if the problem with these machines may have to do with te followed upgrade path.

If this can be found out it will be way easier for me to determine if I should do a clean install for the servers that cannot be upgraded.

share|improve this question
This sounds like an XY problem. Could you be more specific about "having issues"? – 200_success Feb 11 at 8:59

I doubt there is a perfect method. A method could be to check the date of creation of the filesystem:

 sudo tune2fs -l /dev/sda1  | grep 'Filesystem created:'
 Filesystem created:       Thu Mar  5 15:51:50 2015

The system I pulled this from was created on March 5th 2015. Of course it is entirely possible to install 14.10 on March the 5th and then upgrade to 15.04 so it is no perfect method.

Since ...

cat /etc/lsb-release 

the system is 15.04 I would assume it is an installed version and not an upgrade. In hindsight: March 5th probably was the day of the 15.04 got frozen (?)

You can also check ...


total 212
-rw-r--r-- 1 root root   1786 apr 24  2015 apt.log
-rw-r----- 1 root adm  169074 apr 24  2015 apt-term.log
-rw-r--r-- 1 root root  33191 apr 24  2015 history.log
-rw-r--r-- 1 root root      0 apr 24  2015 main.log.partial
-rw-r--r-- 1 root root      0 apr 24  2015 term.log

history.log will have lots of information. That file might be purged on your systems though, but if present will show you if it was an upgrade.

If the logs survived, they could show, for example in a system upgraded from 12.04:

$ grep lsb-release: /var/log/dist-upgrade/main.log
2015-03-14 10:18:36,284 DEBUG lsb-release: 'precise'
share|improve this answer
In particular, /var/log/dist-upgrade/main.log could contain a line mentioning which version the upgrade happened from grep lsb-release: /var/log/dist-upgrade/main.log. – muru Feb 11 at 9:11
thanks .. found out some of the installation had file systems that were created back in 2010. – Solko Feb 12 at 19:52

Not water-proof but another possibility, if the entry was not removed:

$ grep cdrom /etc/apt/sources.list 
# deb cdrom:[Ubuntu-GNOME 15.10 _Wily Werewolf_ - Release amd64 (20151021)]/ wily main multiverse restricted universe

That means, you probably have installed your system with a Wily DVD.

share|improve this answer
The method correctly estimates that my system was upgraded from 14.04 too 16.04 but fails to see that that 14.04 was previously a 12.04. – Thijser Feb 11 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.