• Home
  • Troubleshoot
  • #Example
    • C
    • C++
    • Python
    • R-Programming
  • DSA
  • Quiz
  • Tutorial Videos
  • Home
  • Troubleshoot
  • #Example
    • C
    • C++
    • Python
    • R-Programming
  • DSA
  • Quiz
  • Tutorial Videos
  • #Deals
  • #News
  • #WiKi
  • #APPS
  • #Events
    • #WWDC
    • #I/O
    • #Ignite
  • #Let’s Talk

MyCodeTips mycodetips-newlogocopy1

  • Home
  • Troubleshoot
  • #Example
    • C
    • C++
    • Python
    • R-Programming
  • DSA
  • Quiz
  • Tutorial Videos
Programming, MAC-OS, No-Mouse

How to Uninstall Packages with Homebrew

How to Uninstall Packages with Homebrew

Uninstall Packages with Homebrew: The Homebrew command is the underlying package manager that installs all those UNIX and open-source utilities you might want. It’s the easiest way to install them on Mac OS X, just as it is on Linux. Like Homebrew Cask, it uses simple commands. To search for a utility

macOS Requirements

  1. A 64-bit Intel CPU
  2. macOS High Sierra (10.13) (or higher)
  3. Command Line Tools (CLT) for Xcode: xcode-select –install, developer.apple.com/downloads or Xcode
  4. A Bourne-compatible shell for installation (e.g. bash or zsh)

If you have installed Homebrew on a Mac to use as a package manager for various unix and command line utilities, you’ve probably also installed a handful of packages deemed useful to you. But what if you no longer need one, and you want to remove a particular Homebrew package?

It turns out that uninstalling packages / formula with Homebrew is very easy, and uninstalling and removing packages from Homebrew is just as easy as installing them in the first place.

we’re just talking about removing particular packages from Homebrew.

How to Uninstall & Remove Homebrew Packages

The proper way to remove a Homebrew package is with the uninstall or remove command.

The uninstall Homebrew package command looks like this:

brew uninstall packageName

The remove Homebrew package command looks like this:

brew remove packageName

As you may have guessed by now, the remove and uninstall commands are exactly the same, and get the same result; the removal of the Homebrew package.

For example, to remove and uninstall Telnet (assuming you installed telnet on the Mac with Homebrew anyway), you would use the following command string:

brew uninstall telnet

Or you can use the remove command for the same effect:

brew remove telnet

Removing a package from Homebrew is quick, as there is no need to download anything, it just deletes the Homebrew package from the Mac.

You can confirm the package was removed by trying to run the command again, or by checking where Homebrew packages are installed to and you will find the package you removed is no longer there.

Additional Homebrew Package Uninstall Options

There are two flags you can pass to the Homebrew uninstall command as well; –force and –ignore-dependencies.

The –force flag (or -f) will forcibly remove the package along with deleting all versions of that package / formula.

The –ignore-dependencies flag does just what it sounds like, it will ignore dependencies for the formula in question when uninstalling the designated package.

Managing Dependencies when Uninstalling Homebrew Packages
One thing to be mindful of when removing and uninstalling packages from Homebrew is that if the package being uninstalled has dependencies that are in use by another package or formula, then that may break it causing the secondary package to no longer work correctly. Perhaps the simplest way to prevent that is to use the optional –ignore-dependencies flag. For example:

brew uninstall --ignore-dependencies telnet

If you are not sure what dependencies exist with a particular Homebrew package, you can use the deps command to find that out:

brew deps packageName

For example, if you installed python3 on the Mac using the Homebrew approach, which has a fair amount of dependencies, running that command would look something like the following:

% brew deps python3
gdbm
openssl
readline
sqlite
xz

Since many other packages also use those dependencies, if you were to remove python3 you’d almost certainly want to issue the –ignore-dependencies flag. The same applies to node.js and npm, and many other popular Homebrew packages.

Do you know of any other methods or tips related to uninstalling Homebrew packages and formula? Share with us in the comments below!

  • Click to share on Reddit (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
Written by Ranjan - 6558 Views
AUTHOR
Ranjan

I m Ranjan and Sharing my years of experience in Software Development. Love to code in Mobile apps (IOS, Android, Power Apps, Xamarin, Flutter), Machine Learning ( Beginner ), Dot Net, Databases ( SQL Server, MySql, SQLite), WordPress, Cloud Computing ( AWS, Azure, Google, MongoDB) and many more as required on project-specific. Besides this love to travel and cook.

Next Post
Previous Post

Subscribe for updates

Join 5,733 other subscribers

whiteboard

Whiteboard(PRO)

whiteboard

Whiteboard(lite)

alphabets

Kids Alphabet

techlynk

Techlynk

techbyte

Do2Day

techbyte

Techbyte

Latest Posts

  • Frameworks of IOS
    Frameworks of IOS – Part ( I )
  • NSFileManager or NSPathUtilities
    NSFileManager or NSPathUtilities in Objective-C
  • Passing data between view controllers in Objective-C
    Passing data between view controllers in Objective-C
  • structures-classes-enum
    Structures and Classes in swift !
  • control-system-swift
    Control Flow in Swift
  • swift-concurrency-await
    Concurrency in Swift
  • time-complexity-dsa
    The Term Time Complexity in DSA
  • objective-c-datatypes1
    Objective-C Data Types
  • Convert-jpeg-word
    Convert JPG to Word – Tips You Should Try!
  • objective-c-control-statements2
    Objective-C control statements and loops !

Quick Links

  • #about
  • #myapps
  • #contact
  • #privacy

Other Websites

  • #myQuestions
  • #myBhojanalaya
  • #gadgetFacts
  • #ifscCodesDB

Tag Cloud

Android Android Studio API APP Programming Apps ARC asp.net blogging Browser Config CSS DATABASE DFD error Features GUI HTML HTML5 IDE IIS installation Interview Questions IOS iPhone javascript Mac objective-c OneDrive OS Programming quicktips SDK SEO Settings SMO SQL swift swiftUI Teams Tips & Tricks Tools UI Web Wordpress Xcode

©mycodetips.com