I have done
sudo apt-get remove postgresql-9.4
sudo apt-get install postgesql-9.5
but I still saw that the service 'postgresql-9.4' was starting at boot in systemctl. Then I tried to play around with the .service files and I must have messed something up because now I see that this service now has status Failed in journalctl. Also, now my Rails app that use Postgres 9.5 by default want to listen on port 5432 however this port is taken by the old installation of Postgres 9.4 so they fail to start. I could fix it in the app config and give them port 5433 but it might be a cumbersome to do this with every app so I should fix this on system level. How do I fix this?
I have this in my journalctl:
Home systemd: Failed to start PostgreSQL Cluster 9.4-main. Home /usr/lib/snapd/snapd: snapmgr.go:411: Cannot prepare auto-refresh change: Post https://search.apps.ubuntu.com/api/v1/snaps/metadata: dial tcp: lookup search.apps.ubuntu.com o Home systemd: firstname.lastname@example.org: Unit entered failed state. Home /usr/lib/snapd/snapd: stateengine.go:98: state ensure error: Post https://search.apps.ubuntu.com/api/v1/snaps/metadata: dial tcp: lookup search.apps.ubuntu.com on [::1]:53: r Home systemd: email@example.com: Failed with result 'exit-code'.