Have you considered gnome-packagekit supporting selecting packages for installation and removal in one transaction? Right now, as of 2.27.3, when user selects package for installation, gnome-packagekit prevents him/her from selecting packages for removal and vice-versa.
No, it's not in the PackageKit API, and doing so makes the transaction process much more complex to expose in a sane UI. I think it's best if this stays as two separate transactions. Thanks for opening this bug, but I think it opens a can or worms I really don't want to support.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.