Apt 2.0 introduced a new feature allowing smarter patterns to be used when listing packages. This allows you to list all obsolete packages using the specifier ?obsolete or the shorthand ~o.
$ apt list ?obsolete
It will list all locally installed obsolete packages.
You can also list all packages not provided by Debian (it will also catch packages once provided by Debian but since then removed from the repositories):
$ apt list --installed "?not(?origin(debian))"