You are not logged in.
Sometimes I notice that one of the packages that I have installed aren't available anymore(official and AUR).
So is there a way to create a list of all such packages?
Offline
You can list foreign packages:
-m, --foreign
Restrict or filter output to packages that were not found in the sync database(s). Typically these are packages that were downloaded manually and installed with --upgrade.
Note that AUR packages fall into the category of "manually downloaded and installed", so pacman cannot really reason about their origin.
Online