Upgrading postgres to 10 from 9.5 using pg_upgradecluster
To check for compatibility, etc use the native upgrade command with check option. 


pg_upgrade —check
Refer to the the pg_upgrade doc for details. And remember (just found out for Ubuntu today), datadir is actually the location of the dir which has the config files (hba, ident, pg.conf).


If the —link option is used

sudo pg_dropcluster 9.5 main


should be run. IIRC pg_upgradecluster starts the db cluster automatically.

If you follow pg_upgrade route, there is defined point where the old cluster can still be used/ rolled back to.