Determine actual version$ sudo -u postgres psql Exit withpostgres=# \q First install new version To install the new version, I…