Trouble migrating from postgres 15.1 to percona postgres

I worked my way through the process of installing the Percona Distribution ppg-15.1, including uninstalling the postgres 15 software. I did not need to reimport my database, as it was already there when I restarted the postrgresql service after installing Percona. The database is working well. But I’m not able to run the apt upgrade because I’m getting the following error.

percona-postgresql-contrib : Depends: percona-postgresql-contrib-15
percona-ppg-server-15 : Depends: percona-postgresql-15 but it is not installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

If I run the recommended command, I get:

dpkg: error processing archive /var/cache/apt/archives/percona-postgresql-client-15_2%3a15.1-1.jammy_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/postgresql/15/bin/clusterdb’, which is also in package postgresql-client-15 15.2-1.pgdg22.04+1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack …/percona-postgresql-15_2%3a15.1-1.jammy_amd64.deb …
Unpacking percona-postgresql-15 (2:15.1-1.jammy) …
dpkg: error processing archive /var/cache/apt/archives/percona-postgresql-15_2%3a15.1-1.jammy_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/postgresql/15/bin/initdb’, which is also in package postgresql-15 15.2-1.pgdg22.04+1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/percona-postgresql-client-15_2%3a15.1-1.jammy_amd64.deb
/var/cache/apt/archives/percona-postgresql-15_2%3a15.1-1.jammy_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hello John,

Welcome to the percona community.

Could you share the below details to analyse your issue further?

  1. O.S version.

  2. High-level steps that you followed for the PostgreSQL to Percona PostgreSQL migration.

  3. Crosscheck the PostgreSQL to Percona PostgreSQL migration steps from the below percona documentation.
    Migrate from PostgreSQL to Percona Distribution for PostgreSQL - Percona Distribution for PostgreSQL

Thanks.

Hi Shivam,

Thank you for your reply. OS Version is 22.04.1 LTS. I followed the percona guide to migrate. What I beleieve happened is the installed postgres didnt completely remove, so when I installed the percona version, it only partially installed.

I was able to get past the errors with allot of uninstalling, reinstalling, googling various errors, and working through them. The one that fixed it is the dpkg force removal.