The following bug has been logged on the website:
Bug reference: 14898
Logged by: Yves Goergen
Email address: yves(dot)goergen(at)gmail(dot)com
PostgreSQL version: 10.0
Operating system: Ubuntu
Description:
The documentation of pg_upgrade suggests that -d and -D are the data
directories. But actually they expect the config directories. In a default
installation from the official packages for Ubuntu (from PostgreSQL, not
from Ubuntu), this is a difference between /var/lib/postgresql/10/main and
/etc/postgresql/10/main. See also https://dba.stackexchange.com/q/190469