Find out a list of all previously installed packages
Use pm. pm command is a package manager which allows you to list, install, uninstal and disable your device packages.
adb shell pm list packages

should do the job.