Wrap Installs/Upgrades/Removals in a transaction. If the cancel button is clicked before the operation completes it will rollback the transaction.
Merge pull request #562 from RichardLake/Issue#454

Wrap Installs/Upgrades/Removals in a transaction.