There was a topic on this.
Unfortunately the script does not work in Lubuntu… the file initial-status.gz
is not present.
Will check on MX or Debian
In Void linux it is easy
The command xbps-query
has an option
--list-manual-pkgs
Lists registered packages in the package database (pkgdb) that were installed manually by the user (i.e not as dependency of any package).
There is also an itsFOSS article
How to List Installed Packages on Ubuntu and Debian
There seems to be no general method that works on all distros