How can I filter "dpkg --get-selections" to just packages available in repositories?

I believe Software Center has a feature for syncing between computers these days. If that handle missing packages correctly, it could solve your problem.

The issue here is that dpkg isn't aware of repositories, only installed packages. You can find out if a package is available in a repository by running apt-cache policy $package. If you see a repository in the Version Table, it's available there.

So, how about this?. It's slow, but should work:

dpkg --get-selections '*' \
  | while read line; do
    apt-cache policy $(echo "$line" | cut -f1 ) \
      | grep -q 'http://' \
      && echo "$line"
done