[SERVER-50989] Uninstalling MDB 4.4 via brew does not uninstall the DB Tools Created: 16/Sep/20  Updated: 22/Sep/23

Status: Needs Scheduling
Project: Core Server
Component/s: Packaging
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andrew Feierabend (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File brew-uninstall-does-not-uninstall-dbtools    
Assigned Teams:
Tools
Operating System: ALL
Steps To Reproduce:

1. Install mongod via brew formula following the usual install procedure

2. Uninstall with brew uninstall mongodb-community@4.4

3. DB Tools remain.

Participants:

 Description   

Installing the 4.4 MDB binaries via brew following the usual install procedure now includes the Database Tools as of 4.4.1. However, uninstalling the MDB binaries, and even untapping the formula, does not remove the DB Tools, which remain on-box, linked in /usr/local/bin and accessible in the default $PATH.

The user must manually run a:

brew uninstall mongodb-database-tools

to remove the DB Tools after uninstalling MDB.

I've attached the usual repro steps.

I'm no brew expert by any means, but these formulae follow similar logic to RPMs, and sure enough there appears to be the concept of an "uninstall postflight", found here in this example.

Potentially calling out to system or system_command within the uninstall_postflight stanza might then allow us to just run brew uninstall mongodb-database-tools ourselves. However, this seems a bit strange, as we are running a brew command within an active brew uninstallation step. Up to you. Hope this helps!


Generated at Thu Feb 08 05:24:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.