Just locate the file/folder you wish to remove and enter:
rm -rf filename or foldername
Press RETURN
If the item is in a system owned folder then precede the above command with sudo:
sudo rm -rf filename or foldername
You will be prompted to enter your admin password which will not be echoed.
If you know where the item is located through the Finder or on the Desktop, then drag the item into the Terminal window immediately after 'rm -rf '. Note there must be a space after '-rf'.
Uninstall Apps Using the Trash Can. The easiest way to uninstall an app or program from your Mac is by using the trash can located on the Dock. Drag the application from wherever it is located on your Mac and drop it on the trash can. When you empty the trash, the application is deleted. Finder (Drag To Trash) Uninstall both App Store distributed and Internet downloaded programs on macOS. Terminal (Command Line) Use Command Line to uninstall stubborn programs in Terminal app on macOS. Omni Remover (Clean Uninstall) Expert Mac App Uninstaller program made to clean uninstall stubborn apps in 1-Click. Long press the program icon that you want to get rid of on your Mac for 2-3 seconds You'll see all these app icons get giggling click the Delete button to uninstall this programs on your Mac. MacOS Program Removal Tips: By uninstalling this kind of programs from your Mac, you can redownload and reinstall them from App Store.