I would like to get a list of packages installed on one system and install all of them on another system.
I know that dpkg --get-selections
can give me a list of all installed packages which I can pipe into dpkg --set-selections
on the target system. However, some of the installed packages are ones that I built myself locally (using e.g. checkinstall) and are not available from the repositories. The dpkg --set-selections
process will fail when it is unable to find these packages in the repositories.
So is there a way I can filter the list generated by dpkg --get-selections
so that it only contains packages whose currently-installed version is available in my current repositories?