In previous Ubuntu 16.04 LTS version I used the following procedure in Aptitude to undo package installation or removal:
- Start Aptitude curses by
sudo aptitude
- Select some package(s) to install or remove
- Review the changes list
- Hit F10, then from Actions choose Cancel pending actions to undo the selections made.
The above method fails with modern versions of Ubuntu like 18.04 LTS, 20.04 LTS and 20.10. This change is documented in changelog from 2016-02-21 for Version 0.7.6.
How can get "Cancel pending actions" functionality in modern Ubuntu versions?