This isn't built into OSX, but a guy wrote a cli tool called trash that is cross platform and is intended as a safe alternative to rm. As it seems it should, it moves the target to the trash rather than deleting it immediately.
There is more information and instructions on how to install at the trash github page
Answer from dwightk on Stack ExchangeHey guys, I was wondering if there was a way to remove an app fully with Terminal? Whenever I try to remove app and reinstall it with a new version with terminal it's the same old version but a higher size. Can anyone tell me what I am possibly doing wrong?
macos - deleting app from terminal - Ask Different
Trying to uninstall apps with terminal | MacRumors Forums
New to Mac, how to completely uninstall app?
How To Use Terminal To Delete Apps?
Why can't I uninstall apps on Mac?
How to uninstall apps on Mac Monterey?
You can use conventional methods like removing applications to the Trash and the Launchpad of Monterey. The uninstallation process may be more straightforward using those traditional approaches. However, specialized program uninstallers, third-party applications, and Terminal commands can assist in removing the files in their entirety.
How to delete apps on Mac that won't delete?
Videos
This isn't built into OSX, but a guy wrote a cli tool called trash that is cross platform and is intended as a safe alternative to rm. As it seems it should, it moves the target to the trash rather than deleting it immediately.
There is more information and instructions on how to install at the trash github page
It is not recommended to use the rm method since you can mistakenly remove wrong file and it is no longer in trash.
But if you must:
Instructions
Type
sudo rm –f(with a space after the f and not including the quotes) to delete a file.Type
sudo rm –rfto delete a folder.Drag and drop the files you wish to delete onto the open Terminal window. The files you drop on the Terminal window will be deleted. You can drag and drop multiple files and folders onto the Terminal window.
Read more: http://www.ehow.com/how_4530950_delete-terminal-mac-os-x.html#ixzz324fT3H5z
YOU HAVE BEEN WARNED !
Hi all - coming to Mac from Windows.
Are there some general rules for how to completely remove\uninstall an app?
I'm noticing that apps that I install will sometimes put files in random places such as
~/Library/Application Support/
~/Library/Preferences/
I'm not noticing any straightforward pattern in terms of where apps install auxiliary files.
Thanks!
I tried to install the new Catalina update, and I guess it didn't have enough space (it didn't say, it started the update process). I don't think it finished, and now I can't get past my login screen without my Macbook (Pro, 2015) shutting down. I've tried everything, and all I can think to do is free up space and re-install Catalina through recovery mode.
I need to free up 4 more gbs of space. I can't get to my applications folder, since I can't log in, so I was wondering how can I use the terminal to do it? I was going to delete my Adobe applications, but when I've followed instructions to get into my Applications folder path, I don't see any of the apps.
Any help/advice would be very appreciated. I really don't wanna have to wipe my drive.