The vrms program will analyze the set of currently-installed packages on a Debian-based system, and report all of the packages from the non-free and contrib trees which are currently installed.
In some cases, the opinions of Richard M. Stallman and the Debian project have diverged since this program was originally written. In such cases, this program follows the Debian Free Software Guidelines.
Note that vrms is not limited to Debian systems only (which means that it also works with Debian-derived distributions such as Ubuntu). It is also not limited to Linux-based systems.