/usr/bin/ecpg is a symlink that gets handled by the update-alternatives mechanism. By default this mechanism selects the highest installed version of PostgreSQL, which would currently be postgresql16, if you have it installed. If the devel package for the selected version is not installed there is no ecpg symlink (same for the binaries that come with other postgresqlXX subpackages for the respective versions). To solve that you can either manually call (as root): update-alternatives --set postgresql /usr/lib/postgresql15 ... or make sure that no postgresql16 packages are installed. But if you are not bound to version 15 for other reasons I would suggest to migrate to version 16 and leave update-alternatives at its defaults.