OSX Full NI Uninstall Script [Help Me Make it Better]

OSX Full NI Uninstall Script [Help Me Make it Better]

I would like to make an OSX command script that removes every trace of any Native Instruments files, drivers and software. I only own a Maschine and an X1 so I don’t know what else I am missing but I likely am missing something.

You can download the ni-uninstall.command file by right clicking that link and choosing Save Link As.

#!/bin/bash
# This script removes all Native Instruments files, software, and drivers.
# https://www.native-instruments.com/en/support/knowledge-base/show/413/how-to-uninstall-native-instruments-software-and-drivers-from-a-mac-os-x-computer/
read -p "Are you sure you want to uninstall all Native Instruments software and drivers?" -n 1 -r
echo
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo
echo "Uninstalling..."
sudo rm -rfv /Applications/Native\ Instruments
sudo rm -fv /Library/Preferences/com.native-instruments.*.plist
sudo rm -rfv /Library/Audio/Plug-Ins/Components/Maschine*
sudo rm -rfv /Library/Audio/Plug-Ins/VST/Maschine*
sudo rm -rfv /Library/Application\ Support/Digidesign/Plug-Ins/Maschine*
sudo rm -rfv /Library/Application\ Support/Avid/Audio/Plug-Ins/Maschine*
sudo rm -rfv /Library/Application\ Support/Native\ Instruments
sudo rm -fv ~/Library/Preferences/com.native-instruments.*.plist
sudo rm -rfv ~/Library/Application\ Support/Native\ Instruments
sudo rm -rfv /System/Library/Extensions/NIUSB*.kext
if [[ ${OS_Version} == 10.11 ]]; then
echo "Operating System does not require disk utility to repair permissions."
else
echo "Repairing Disk Permissions"
echo
sudo diskutil repairPermissions /
fi
fi
echo
echo "EXIT"
exit

I am assuming no one is going to really assist me in finding all of the install paths I need to account for. This isn’t a big deal, DJs are just not programmers. However if in the future someone runs across this who wants to submit some code changes please check out the command file on GitHub…

I think you pretty much have everything covered. Just a heads up, 10.11 Disk Utility removes the ability to check and repair disk permissions.

From the release notes:

  • System file permissions are automatically protected, and updated, during Software Updates. The Repair Permissions function is no longer necessary.

Well that’s interesting. I assume this’ll make software installation take a little longer unless this is happening in the background. Thanks, I’ll write an if then check that takes into account OS version number for the last part.

Huh, this is kind of scary. I don’t like this Rootless business. El Capitan's System Integrity Protection will shift utilities' functions | Macworld

[QUOTE]no user, application, or process will be able to write files or modify files in the root System folder or the /bin, /sbin, and /usr directories[/QUOTE] WHAT THE SHIT!?

Almost everything except the following lines…

sudo rm -rfv /Library/Audio/Plug-Ins/Components/Maschine*
sudo rm -rfv /Library/Audio/Plug-Ins/VST/Maschine*
sudo rm -rfv /Library/Application\ Support/Digidesign/Plug-Ins/Maschine*
sudo rm -rfv /Library/Application\ Support/Avid/Audio/Plug-Ins/Maschine*

This only uninstalls Maschine, I am unsure what the remaining Native Instruments file path names are. I can guess but I would rather not (who knows what damage a guess might cause).

Library/Audio/MIDI\Devices/Native\ Instruments contains the image files used on the Audio/MIDI app
(User)/Library/Application\ Support/Native\ Instruments contains Service Centre and Controller Editor presets

I’d say it’s pretty safe to delete the main NI folders like you already do with /Library/Application\ Support/Native\ Instruments. Maschine most likely stretches a bit further like their other production offerings since you need to locate the individual plugins and such.

I wrote to NI tech support asking for the other install paths other than Maschine.

sudo rm -rfv /Library/Audio/MIDI\Devices/Native\ Instruments
sudo rm -rfv ~/Library/Application\ Support/Native\ Instruments

Has been added to the script.

Okay so Native Instruments tech support was as useless and lacking capability to understand what I was asking as I suspected.

Morons

Hey at least you didn’t purchase two CDJ 850s for $1800 because the tech support said it was HID enabled on Traktor!

Are you going to create an executable with your script or just keeping it as is requiring a copy and paste into command? (or am I mistaken on how to run this?)

With OS X you can just double click any .command file and it’ll execute a terminal instance which will do everything for you and when finished it will close the terminal instance.

You can download the ni-uninstall.command file by right clicking that link and choosing Save Link As.

But it still isn’t finished for everyone as I haven’t added any hardware other than Maschine.

Why would a ‘Support Agent’ - who are there to advise on hardware and software technical issues (at install level) have any knowledge of which lines of script to add to your command script…???

That’s not their remit. They probably aren’t even allowed to do so.

Maybe try get hold of a developer or… just ask NI to send you the Uninstall Tool that does all this anyway.

This used to be a free download from their support site. Any clue why it got taken down?

My question wasn’t about my code. It was about exactly where does Native Instruments install files for OS X. The online documentation they provide is incomplete or rather it’s inaccurate. However tech support is unaware of this being an issue. Their support is more or less ignorant of anything technical. I think my “moron” quote stands- you may disagree- let us move on please.

Also just a note, they will not put a user in contact with their developers. Do you know any?

The Tech Support person I was talking to was unaware of the uninstall script and denies that it ever existed. I remember using it in the past; it’s odd that it’s gone.

I don’t know. I still have it. It was moved to the Protected section before it disappeared. The last conversation I have on record with the Senior Quality Assurance Engineer regarding the tool was 2 years ago. There have been issues with the OS X version in the past though.

Support agents don’t write the Knowledge Base articles. They can only advise as best they can with the documentation they have.

Factually incorrect.

I strongly disagree and any intelligent person would not use the word “moron” just because someone cannot help in what is not a support agents roll.

I know.

Yes.

If an agent said that then they are mistaken or maybe they were not an agent at the time and are unaware that it ever existed.

Either way I can ask if the tool will be made available again if you wish.

Thank you, I don’t count on it being available anytime soon and a DIY solution is IMHO acceptable.

Please ask your developer contact where Native Instruments software installs their products drivers, software and any other associated files. I need specific directory paths and file names.

For example in the list below you’ll notice I have “Maschine*” which wild cards all files/dirs named Maschine. However there are other products Native Instruments creates other than Maschine and I would like to know where those install as well.

/Applications/Native\ Instruments
/Library/Preferences/com.native-instruments.*.plist
/Library/Audio/Plug-Ins/Components/Maschine*
/Library/Audio/Plug-Ins/VST/Maschine*
/Library/Application\ Support/Digidesign/Plug-Ins/Maschine*
/Library/Application\ Support/Avid/Audio/Plug-Ins/Maschine*
/Library/Application\ Support/Native\ Instruments
~/Library/Preferences/com.native-instruments.*.plist
~/Library/Application\ Support/Native\ Instruments
/System/Library/Extensions/NIUSB*.kext
/Library/Audio/MIDI\Devices/Native\ Instruments
~/Library/Application\ Support/Native\ Instruments

Please don’t hesitate to ask questions if I am being unclear.

THANK YOU FOR THE HELP! :smiley:

Alternatively you could send your friend the GitHub source URL and ask them to contribute there.