How to Uninstall Apps on Mac with Terminal Sudo Uninstall Command

Cassie Xie
Last updated: May 22, 2024
Summary: This post mainly introduces how to uninstall apps on Mac with Terminal commands. Some other ways to uninstall applications on Mac are also introduced.

On macOS, you can uninstall applications using Terminal. It involves a few steps. Check the detailed guide below.

uninstall apps on Mac with Terminal

How to Uninstall Apps on Mac with Terminal

Step 1. Open Terminal on Mac

Click Finder > Applications > Utilities > Terminal to open the Terminal app on your Mac. Alternatively, you can click the Spotlight Search icon to search and open Terminal.

Step 2. Uninstall Apps on Mac with Terminal Sudo Uninstall Command

  • In the Terminal window, type the command sudo uninstall file://.
  • Then go to the Applications folder to find the target app and simply drag the icon of the application after the command. You can see the app’s path is automatically added after the command.
  • Press Enter to directly uninstall the app from Terminal. It may ask you to enter the administrator password, do it.
How to Uninstall Apps on Mac with Terminal

If Terminal displays the message "command not found: uninstall," use the uninstall-cli.sh tool to completely uninstall apps on your Mac via Terminal.

Here's how to uninstall an app on Mac using the uninstall-cli.sh tool.

  1. Open Terminal.

  2. Download and install Homebrew, a free and open-source package manager for macOS and Linux.

  3. Install the uninstall-cli.sh tool using Homebrew.

  4. Once done, run the command below in Terminal.

    uninstall-cli.sh /Applications/app_name.app

Note: Please don't forget to replace app-name with the name of the app you want to uninstall. For example: uninstall-cli.sh /Applications/Docker.app.

  1. Follow the instructions in Terminal to complete the uninstallation.
Tip
To delete apps that won’t delete on Mac, you may also try Terminal. Be careful when you uninstall programs on your Mac using Terminal, or it may potentially delete files and cause data loss.

Uninstall Apps on Mac without Leftovers via BuhoCleaner

If you are not familiar with Terminal commands, you may use another safer way to uninstall apps on Mac. To remove an app along with deleting all its leftovers, you can use BuhoCleaner to easily realize the task.

BuhoCleaner is a popular Mac cleaner app that helps you clean your Mac from various aspects. It allows you to completely uninstall apps on Mac without leftovers. You can also use it to scan your Mac to remove junk files with one click, find and delete large or duplicate files, manage startup items on your Mac, free up RAM, analyze disk space, flush DNS, and more.

Download and install BuhoCleaner on your Mac and use it to uninstall apps on your Mac with one click.

DownloadFor macOS 10.10 and above
100,000+ Satisfied Users Worldwide
  1. Launch BuhoCleaner on your Mac.
  2. Click App Uninstall in the left panel.
  3. Find the target application in the right window, select it, and select all its related files.
  4. Click the Remove button to uninstall the app from your Mac with one click.
Uninstall Apps on Mac with BuhoCleaner

Alternative to Uninstalling Apps with Terminal

Aside from using Terminal to uninstall applications, macOS also allows you to easily uninstall an app via Finder or Launchpad.

  • Open Finder, click Applications, find the target app and right-click it, select Move to Trash to remove it.
  • Open Launchpad from the Dock, find the target application, click and hold the app icon, and click the “x” icon next to the app to delete the app.

Please note that uninstalling an app with Finder or Launchpad doesn’t remove all its associated files and settings. If you want to ensure that all related files are removed, you still need to manually remove leftovers or use a third-party app uninstaller application like BuhoCleaner introduced above.

Bottom Line

This post gives a simple guide on how to uninstall apps on Mac with Terminal commands. Some alternative ways are also provided to help you easily remove an app from your Mac without leftovers. Hope it helps. For more Mac and iPhone tips, you may visit our official website: https://www.drbuho.com/.

Cassie has been writing about technology for her entire career life - over 5 years. She enjoys diving into how Apple products work and then breaking it down in a way anyone can understand.