Question: how to check if a package is installed in raspberry pi?
Answer: Show status of all packages on the system /var/lib/dpkg/available: list of available packages from repositories. /var/lib/dpkg/status: status of installed (and available) packages. This file contains information about whether a package is marked for removal or not, whether it is installed or not, etc.