I removed a program from my MacBook Pro by deleting the app. I also found a few other things in the file system and removed them. Is there a way to ensure no additional information is left on my laptop? Perhaps from command line?
AppCleaner is a free application which searches for files associated with an App, but I don't know how far it goes in ensuring nothing is left.
There is no guaranteed way or app that will remove all the files used by a program unless the application comes with an uninstall program, even then do you want all documents you created with the program to be removed?
Leaving aside the documents, you would have to assume that the program was well written and wrote configuration and other files only to the places that Apple suggest. These include
~/Library/Application Support for various files but exactly where in that directory? Some use the application name, others the supplier.
~/Library/Preferences, again what is the file name? Also
~/Library/Caches for caches. Add to these possible use of the
/Library versions of the folders.
OSX does not provide a registry of files used by an app.
However in iOS and now OSX sandboxes all the files will be under one directory and so can be removed - but note this might include any documents you created. Also, note that not all applications are or can be sandboxed.
When I want to delete all the preferences without the app (especially when something is acting wonky) I use AppZapper and just uncheck the application. Although as Mark said there is no guarantee you'll be able to delete everything. For example some developers (of unsandboxed apps) create hidden strangely named files in order to counteract piracy. Although this may not affect you it annoys me when I have unnecessary files around after uninstalling applications. This is also why I do clean installs whenever I need to reinstall.
The only way to guarantee removal of anything and everything an app could leave behind (especially if you are running using an admin account) is to clone your HD(s), eject the clone before installing and running the app, and then do a complete HD reformat and restore from the clone drive after removing the app. Make sure the clone is bootable.