Read time: 1 minute

To list installed packages in Ubuntu or other debian based systems:

dpkg --get-selections

To copy this list to a file, type:

dpkg --get-selections > file.txt

To list installed packages in Fedora or rpm based linux, type:

rpm --queryformat="%{NAME}-%{VERSION} \n" -qa