I recently had to find out if a particular package was properly installed in my Debian Linux OS as something was broken. I used the following command to do that.
dpkg --get-selections | grep -v deinstall | grep oracle
This basically lists out all the packages which contain the text ‘oracle’ in them. Once I find out the exact package name I can actually decide to remove all packages containing them.
sudo apt-get purge oracle*
sudo apt-get autoremove oracle*