# Trouble migrating from postgres 15.1 to percona postgres

**URL:** <https://forums.percona.com/t/trouble-migrating-from-postgres-15-1-to-percona-postgres/20073>\
**Category:** Percona Distribution for PostgreSQL\
**Created:** [February 13, 2023, 4:16pm UTC](https://forums.percona.com/t/trouble-migrating-from-postgres-15-1-to-percona-postgres/20073 "2023-02-13T16:16:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john1](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@john1](https://forums.percona.com/u/john1)\
**Post date:** [February 13, 2023, 4:16pm UTC](https://forums.percona.com/t/trouble-migrating-from-postgres-15-1-to-percona-postgres/20073/1 "2023-02-13T16:16:50Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Shivam\_Dhapatkar](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shivam_dhapatkar/32/8774_2.png) [@Shivam\_Dhapatkar](https://forums.percona.com/u/Shivam_Dhapatkar)\
**Post date:** [February 15, 2023, 8:47am UTC](https://forums.percona.com/t/trouble-migrating-from-postgres-15-1-to-percona-postgres/20073/2 "2023-02-15T08:47:58Z")

</div>

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](https://docs.percona.com/postgresql/15/migration.html)

Thanks.

---

<div class="post-metadata">

**Author:** ![john1](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@john1](https://forums.percona.com/u/john1)\
**Post date:** [February 15, 2023, 2:01pm UTC](https://forums.percona.com/t/trouble-migrating-from-postgres-15-1-to-percona-postgres/20073/3 "2023-02-15T14:01:58Z")

</div>

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.
