This used to be possible with SteamCMD for this (it’s packaged in Debian’s non-free repositories and in Ubuntu’s multiverse):
steamcmd +apps_installed +quit
will list all installed applications with their id, and
steamcmd +app_uninstall appid +quit
will uninstall the application matching the given id; add `-complete` before the id for a complete uninstall.
SteamCMD now appears to be limited to handling games it installed, rather than any game in the default Steam directories; it also seems to be primarily intended for managing dedicated game servers with specific SteamCMD clients, rather than any game available on Steam.
You can manually remove a game by deleting its directory, usually in `steamapps/common` in your Steam directory, and its manifest in `steamapps`; the main Steam client may however still consider the game to be installed.