How to compare what’s installed in this ubuntu pc vs that ubuntu pc

How to compare what’s installed in this ubuntu pc vs that ubuntu pc:  (dpkg –list | sort > /tmp/thispc.txt) ; (ssh user@thatpc dpkg –list | sort > /tmp/thatpc.txt) ; diff -y /tmp/thispc.txt /tmp/thatpc.txt|less #ubuntu...