Packages need to declare the appropriate Replaces and Breaks (or Conflicts if no later version of the package previously shipping the file exists)
** Package changed: apt (Ubuntu) => apparmor (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apparmor in Ubuntu. https://bugs.launchpad.net/bugs/2036302 Title: Apt fails to upgrade when file ownership of packages changes Status in apparmor package in Ubuntu: New Bug description: When running apt-get distupgrade I saw this message: Preparing to unpack .../apparmor_4.0.0~alpha2-0ubuntu3_amd64.deb ... Unpacking apparmor (4.0.0~alpha2-0ubuntu3) over (4.0.0~alpha2-0ubuntu2) ... dpkg: error processing archive /var/cache/apt/archives/apparmor_4.0.0~alpha2-0ubuntu3_amd64.deb (--unpack): trying to overwrite '/etc/apparmor.d/usr.bin.lxc-start', which is also in package liblxc-common 1:5.0.1-0ubuntu6 dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) The problem could be overcome with: sudo apt-get install liblxc-common --reinstall which resulted in output Preparing to unpack .../liblxc-common_1%3a5.0.1-0ubuntu6_amd64.deb ... Unpacking liblxc-common (1:5.0.1-0ubuntu6) over (1:5.0.1-0ubuntu6) ... I have seen the same type of problem before with other packages. I would have expected apt-get to correctly sequence all necessary actions on its own. These are related events in my apt history: Start-Date: 2022-10-30 05:33:09 Commandline: apt-get install lxc Requested-By: ubuntu (1000) Install: liblxc-common:amd64 (1:5.0.0~git2209-g5a7b9ce67-0ubuntu3, automatic) Start-Date: 2023-01-28 11:06:34 Commandline: apt-get dist-upgrade Requested-By: ubuntu (1000) Upgrade: liblxc-common:amd64 (1:5.0.0~git2209-g5a7b9ce67-0ubuntu3, 1:5.0.1-0ubuntu6) ProblemType: Bug DistroRelease: Ubuntu 23.10 Package: apt 2.7.3 ProcVersionSignature: Ubuntu 6.5.0-5.5-generic 6.5.0 Uname: Linux 6.5.0-5-generic x86_64 NonfreeKernelModules: zfs ApportVersion: 2.27.0-0ubuntu2 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: KDE Date: Sat Sep 16 11:12:36 2023 InstallationDate: Installed on 2021-07-01 (807 days ago) InstallationMedia: Kubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420) SourcePackage: apt UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2036302/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp