How to upgrade PostgreSQL 9.6 to 10 in Ubuntu 16.04? Is there any simple apt-get version?

Some people here said the long process was OK for them.
 (https://gist.github.com/delameko/bd3aa2a54a15c50c723f0eef8f583a44)
Is there any simple apt-get version?


Yes. As described in the webpage you linked to, you can install PostgreSQL 10 using the official posgres apt repository (instead of the default Ubuntu repository for 16.04):

sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql


You can remove the old version (9.6) beforehand, e.g. by

sudo apt-get remove postgresql-* pgadmin3* pgagent 


But make sure you backup your database first so that you can restore it after the upgrade as pointed out in the comments.