Without using grep
adb shell pm list packages [your.package.name] as mentioned in the below answer
According to (also) correct answer below, try grep the result from pm list
packages.
adb shell pm list packages | grep com.your.app.package
If the application is already installed and if you try to install the same app
again, adb will return with an error - Failure [INSTALL_FAILED_ALREADY_EXISTS].
However, if you want to re-install the already installed app, then use -r
parameter.
Ex:
adb install -r game.apk