0

When I install the ubuntu server, the postgresql repository package names are installed on server automatically. So when I type command sudo apt-get install postgresql it will start installation. But which version will be installed? I don't know it.

So how can I learn which version will be installed?

barteloma
  • 6,403
  • 14
  • 79
  • 173
  • 2
    Possible duplicate of [Which version of PostgreSQL am I running?](https://stackoverflow.com/questions/13733719/which-version-of-postgresql-am-i-running) or maybe https://stackoverflow.com/questions/18885820/how-to-check-the-version-before-install-packages-using-apt-get? – Ocaso Protal Feb 05 '19 at 07:49
  • 1
    `apt-cache policy postgresql` – zerkms Feb 05 '19 at 07:54
  • @zerkms thank for answer. I run command `apt-cache policy postgresql` and response is like this `9.5+173ubuntu0.2` But minor version does not write like 9.5.14 – barteloma Feb 05 '19 at 08:03
  • @OcasoProtal I want to learn which version of Postgresql will be installed from apt cache. Bu your solution is to learn Postgresql version after installed. – barteloma Feb 05 '19 at 08:06
  • @barteloma Did you even check the second link? – melpomene Feb 05 '19 at 08:08
  • @melpomene checked now, thanks. But my question marked as duplicate using wrong link. – barteloma Feb 05 '19 at 08:16
  • 1
    You can also `apt-cache show`. If neither has that information - then it's impossible to obtain it from elsewhere. – zerkms Feb 05 '19 at 08:16
  • @barteloma Yeah, I misunderstood your question first, sorry. That's why I added the second link. Either way there is already a solution for your question ;) – Ocaso Protal Feb 05 '19 at 09:33

0 Answers0