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 Exchange
🌐
Reddit
reddit.com › r/macos › using terminal to fully delete applications
r/MacOS on Reddit: Using Terminal to Fully Delete Applications
June 11, 2023 -

Hey 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?

🌐
Apple Community
discussions.apple.com › thread › 2449492
Removing/Uninstalling an application by Terminal
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". ... Hi Thanks for the reply ! Actually, I know all of those commands, what i need to know exactly is : ...
🌐
Reddit
reddit.com › r/osx › how to use terminal to delete apps?
r/osx on Reddit: How To Use Terminal To Delete Apps?
November 17, 2019 -

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.

🌐
MacRumors
forums.macrumors.com › macs › macos › older macos versions › macos mojave (10.14)
Trying to uninstall apps with terminal | MacRumors Forums
September 11, 2020 - I was reading on the web that its possible to uninstall through terminal. The command line that I saw was $sudo uninstall file:// ( then you would drag the app from the application folder and paste it on the terminal ).
🌐
How-To Geek
howtogeek.com › home › linux › how to uninstall software using the command line in linux
How to Uninstall Software Using the Command Line in Linux
August 12, 2024 - Autoremove has occasionally been known to get a bit overzealous and remove something it shouldn't. If you don't care too much about making sure stray dependencies get removed, just use sudo dnf remove.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › linux › linux delete and uninstall software command
Linux Delete and Uninstall Software Command - nixCraft
September 8, 2022 - To list installed software type: # dpkg --list # dpkg --list | less # dpkg --list | grep apache2 To delete the software named apache2, use the apt command or apt-get command as follows: $ sudo apt-get remove {package-name} $ sudo apt-get remove ...
Find elsewhere
🌐
Avast
avast.com › c-uninstall-mac-apps
How to Uninstall Apps on a Mac | Delete Mac Programs
April 8, 2024 - Now type: sudo rm -f <application name>. Replace <application name> with your app’s name, and make sure you add a space after -f. Then hit return and enter your password. It’s possible that some system files will remain after deleting the app.
🌐
Ascendant USA
ascendantusa.com › 2024 › 12 › 28 › uninstall-apps-on-your-mac
How to Uninstall Apps on Your Mac | Ascendant
October 21, 2025 - Should these steps fail, use Terminal to force delete the app. In Terminal, navigate to the Applications directory and use the command sudo rm -rf AppName.app, replacing “AppName” with the app’s actual name.
Top answer
1 of 12
376

If the application has been installed via the package manager, all you have to do is run

sudo apt-get remove <application_name>

That should always work. If the terminal isn't what stirs your tea, you could open System → Administration → Synaptic Package Manager, search for the package you want to remove, click on the checkbox next to it and select "mark for removal". Once you click "Apply", the package should be removed. There's of course also the Ubuntu Software Center. It's pretty much the same thing as Synaptic. Just search for the application name and click the "Remove" button.

Sometimes applications can be split up into multiple packages (for example, many games have a separate package for their music). To make sure that you uninstall all related packages AND configuration files, you can type

sudo apt-get purge <package-name>

or -in Synaptic- "mark for complete removal" instead of just "mark for removal".

As for applications that have been manually compiled and installed, there's not always a single way to remove them. The best thing to do is consult the README/INSTALL file that accompanied the source package - if one exists.

2 of 12
78
  • The software centre: find the package, click remove

  • Synaptic : the same


  • apt-get:

      sudo apt-get remove <package> && sudo apt-get autoremove
    
  • aptitude:

      sudo aptitude remove <package>
    

It's important to note that when you install things, they often depend on other packages. When you fire off apt-get remove <package> it doesn't remove the automatically-installed applications by default. This is often safer (if you're temporarily removing something like ubuntu-desktop) but this can mean you end up with a load of cruft.

aptitude will automatically remove things (as well as having a nice interactive command line interface)

You can also search for cruft in synaptic using the "local or obsolete" filter under the status section.

🌐
Beebom
beebom.com › uninstall-programs-apps-mac
How to Uninstall Apps and Programs on Mac (6 Methods) | Beebom
January 13, 2025 - Open the Finder app from the Dock and click on Applications · Select the app you wish to delete and hit Command + Delete on your keyboard.
🌐
Wikihow
wikihow.com › computers and electronics › operating systems › linux › ubuntu › how to uninstall ubuntu software and packages: easy guide
How to Uninstall Ubuntu Applications in Terminal or GUI
February 19, 2026 - We'll also show you how to clean up unneeded configuration files and orphaned dependencies for a complete uninstall. To uninstall an application in the terminal, use sudo apt remove <package_name>.
🌐
Dr.Buho
drbuho.com › how-to › uninstall-apps-on-mac-with-terminal
How to Uninstall Apps on Mac with Terminal Sudo Uninstall Command
June 4, 2025 - Click Finder > Applications > Utilities > Terminal to open the Terminal app on your Mac. Alternatively, click the Spotlight Search icon to search and open the Terminal. Step 2. Uninstall Apps on Mac with Terminal Sudo Uninstall Command
🌐
Liquid Web
liquidweb.com › home › remove package in ubuntu: linux how to uninstall
Remove Package in Ubuntu: Linux How to Uninstall | Liquid Web
June 2, 2025 - Note the full name of the package. Then, type in one of the following commands: sudo apt remove <package_name> sudo apt remove <package_name_1> <package_name_2> sudoapt purge <package_name>
🌐
OS X Daily
osxdaily.com › 2014 › 07 › 31 › manual-complete-app-removal-mac-os-x-terminal
How to Completely Remove Apps & Software in Mac OS X by Manual Terminal Uninstall
October 26, 2017 - I didn’t use the rm command but i actually just went into Finder, made a copy of the files just in case i make a mistake and proceeded to deleted the files in my library. Now i don’t have an annoying process running in the back of my mac ...
🌐
Google Support
support.google.com › chromebook › thread › 211306991 › uninstall-linux-apps-using-terminal
Uninstall Linux apps using terminal - Chromebook Community
April 16, 2023 - Skip to main content · Chromebook Help · Sign in · Google Help · Help Center · Community · Chromebook · Terms of Service · Submit feedback · Send feedback on
🌐
MakeUseOf
makeuseof.com › home › mac › how to uninstall apps on a mac
How to Uninstall Apps on a Mac
July 8, 2024 - As an example: ... You'll be prompted to enter your Mac's admin password again. Simply do that, and the app will be deleted from your Mac entirely. Use caution while running the sudo rm -rf command. Inserting an incorrect path can lead to data loss.
🌐
Reddit
reddit.com › r/ubuntu › how do i delete an application from terminal?
r/Ubuntu on Reddit: How Do I delete an application from terminal?
July 9, 2021 -

I'm trying to delete an application on the terminal, as it won't go into my trash. And everytime I use the rm or the unlink commands it said that I didn't have permission. Then I tried Sudo rm and it asked for my password and nothing happened. After that command it disapered from my Files app, but was still openable on the "Show Applications" Menu, and was still showing on my Terminal when I use the command "sudo apt list --installed". (Note I can't delete it from this screen as no matter what I copy and paste it says that no such file or directory exists)