apt list --installed | grep postg
pg_dropcluster 15 main --stop
pg_upgradecluster 13 main
service postgresql@13-main stop
service postgresql@15-main start
pg_lsclusters
pg_dropcluster 13 main
apt-get purge postgresql-13 postgresql-client-13

By karlo