1. Ubuntu 12.04
2. I just ran "sudo apt-get install postgresql". I installed this after installing ubuntu.
3. sudo dpkg --purge postgresql-9.4
4. Afte uninstaling 9.4 I again tried "sudo apt-get install postgresq" and it installed 9.5
5. Version is 9.5, I can create table, insert data and run queries.