That’s not something that can be made reliable with either rpm or apt. The only options for reliable upgrades are 1) nix model or 2) filesystem transactions/snapshots. Especially, yum has official plugin for making LVM/Btrfs/ZFS(?) snapshot before committing each transaction. I imagine there’s something similar for Debian/Ubuntu.
That’s not something that can be made reliable with either rpm or apt. The only options for reliable upgrades are 1) nix model or 2) filesystem transactions/snapshots. Especially, yum has official plugin for making LVM/Btrfs/ZFS(?) snapshot before committing each transaction. I imagine there’s something similar for Debian/Ubuntu.