I'd need to list the packages AND their versions installed on a Ubuntu box so that it can be re-created on other boxes, or the original box later on if needed.
All "save and restore" answers I've seen list the
dpkg --get-selections > package.list command but that doesn't include the version for each packages.
Freezing the packages along with their versions is something that is done by all modern package managers (npm for nodejs, pip for python, etc). What is the proper way to do this in Ubuntu?