Add ubuntugis PPA:
$ sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
Add POSTGIS repository: