20

I installed Mono on my iMac last night and I immidiately had a change of heart! I don't think Mono is ready for prime time.

The Mono website says to run the following script to uninstall:

#!/bin/sh -x
#This script removes Mono from an OS X System.  It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-SVN.pkg
cd /usr/bin
for i in `ls -al | grep Mono | awk '{print $9}'`; do
rm ${i}
done 

Has anyone had to uninstall Mono? Was it as straight forward as running the above script or do I have to do more? How messy was it? Any pointers are appreciated.

Drise
  • 4,310
  • 5
  • 41
  • 66
Mac
  • 2,693
  • 7
  • 36
  • 44

7 Answers7

11

The above script simply deletes everything related to Mono on your system -- and since the developers wrote it, I'm sure they didn't miss anything :) Unlike some other operating systems made by software companies that rhyme with "Macrosoft", uninstalling software in OS X is as simple as deleting the files, 99% of the time.. no registry or anything like that.

So, long story short, yes, that script is probably the only thing you need to do.

Adrian Petrescu
  • 16,629
  • 6
  • 56
  • 82
  • 4
    Lame comment. A/R Prog (who uses it to Add anyway?) is the dinosaur. As per the answer, deleting the application itself is all that's required 99% of the time. This framework (not an app) is a 1%-er. The script is basically ensuring _all_ its DLLs are removed. Something ARP is less than perfect at. – RET Oct 05 '08 at 02:35
10

Year 2017 answer for those, like myself, looking at SE first and official docs later (FYI I know the question was for OS Leopard). Run these commands in the terminal:

sudo rm -rf /Library/Frameworks/Mono.framework
sudo pkgutil --forget com.xamarin.mono-MDK.pkg
sudo rm -rf /etc/paths.d/mono-commands
montrealist
  • 5,593
  • 12
  • 46
  • 68
8

Seems the uninstall script has been slightly modified as today (2011-07-12):

#!/bin/sh -x

#This script removes Mono from an OS X System.  It must be run as root

rm -r /Library/Frameworks/Mono.framework

rm -r /Library/Receipts/MonoFramework-*

for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
   (cd ${dir};
    for i in `ls -al | grep /Library/Frameworks/Mono.framework/ | awk '{print $9}'`; do
      rm ${i}
    done);
done

You can find the current version here.

By the way: it's the same exact thing that runs the uninstaller mentioned by joev (although as jochem noted it is not located in the /Library/Receipts, it must be found in the installation package=.

Community
  • 1
  • 1
Albireo
  • 10,977
  • 13
  • 62
  • 96
2

To expand on feelingsofwhite.com's answer, the Mono installer for Mac OS puts the uninstall script in the /Library/Receipts directory, not in the installer image as it says in the Notes.rtf file. The Receipts directory is what the Mac OS Installer.app uses to keep track of which packages were responsible for installing which files. Usually, a list of these is kept in a .bom ("Bill of Materials") file, which can be explored with the lsbom command.

In the case of Mono, they also add a whole bunch of links from your /usr/bin and man directories. Their uninstall scripts finds these and removes them. Since the uninstall script lives in a place the uninstaller deletes, you should probably copy the uninstall script somewhere else before running it:

cd
cp /Library/Receipts/MonoFramework-2.4_7.macos10.novell.universal.pkg/Contents/Resources/uninstallMono.sh .
sudo ./uninstallMono.sh
rm uninstallMono.sh
joev
  • 1,384
  • 9
  • 18
  • 3
    no uninstall script in /Library/Receipts. However, if you have the original iso that comes with the download, there is a `uninstall.sh` in the package contents: `sudo /Volumes/MonoFramework-MRE-2.xxxx/MonoFramework-MRE-2.xxxxxxx.macos10.novell.x86.pkg/Contents/Resources/uninstallMono.sh` – jochem Apr 27 '11 at 16:28
0

http://dragthor.wordpress.com/2007/07/24/uninstall-mono-on-mac-os-x/ Work for me, OSX, But I Use the uninstall script file (.sh) from the Mono Installer Package.

Theseven7
  • 1
  • 1
0

Mono doesn't contain a lot of fluff, so just running those commands will be fine. It's as simple as deleting all the data folders, and the binaries.

montrealist
  • 5,593
  • 12
  • 46
  • 68
Alex Fort
  • 18,459
  • 5
  • 42
  • 51
-1

I just deleted the mono.frameworks folder. I got tired of answering "yes" billions of times...

Oldfrith
  • 61
  • 1
  • 2