11

In my opinion Mono is a patent trap and I do not want my distribution of choice to be tainted by anything Mono or any application that requires Mono. So I would welcome your feedback for the following:

  1. How to prevent anything Mono and applications that require Mono from getting installed in the first place. Is there a way to forcefully disable Mono during installation?

  2. How do I find out if I have anything Mono installed on my current default installation?

  3. If Mono is already installed, how to remove Mono and all applications that require Mono?

Hopefully with your feedback I can make sure that all my bits are truly free.

  • Not really your question, but you do realize that being a user of software that violates patents does not actually make you (as the user) guilty of anything at all, right? – Adrian Petrescu Sep 15 '10 at 6:57
  • 3
    @phunehehe it's because there's an entire horde of zealots spearding FUD about mono being more unsafe, patent wise, unrelated to any common logic, and depite community promises made by Microsoft to not sue. – damageboy Sep 15 '10 at 17:46
  • 2
    @Adrian: INAL and patent law varies widely from country to country, but in the US at least patent law protects the use of patented 'art'. So if you do not personally have a license to use the patented art you can be sued for the use. Unisys tried to do this with the GIF file format years ago, eventually resulting in PNG bit.ly/9fz1mU. Granted the cost to sue an individual outweighs damages that might be awarded for the infringement. Typically the software license agreement that accompanies the software that uses patented art will extend the license to use the patent to the user. – Paul Alexander Sep 17 '10 at 20:55
  • 1
    Upgrading Mono from 4.x in Ubuntu 18.04 "bionic" repo to 6.x in Mono repo didn't go so well for me, with tons of DLLs failing to register. This is another reason to purge Mono from an Ubuntu installation: so you can catch a pure first-hand case of Mono. – Damian Yerrick Aug 10 '19 at 2:23
  • 1
    @DamianYerrick I had the same issue, I needed this so I could completely uninstall before trying a fresh reinstall because the upgrade process was poorly designed. – Dyndrilliac Aug 10 '19 at 17:59
22

Disclaimer: I offer this answer since I believe you should have control over what packages are on your system--not to flame the mono-hate flame war. Also this question is heavily edited since my first post.

Removing Mono

To remove mono completely all you have to do is remove the base mono libraries, and all files that depend on those libraries will also be removed. The exact set of packages that need to be removed vary depending on which version of Ubuntu you are using. I believe you should be able to remove most of mono with the following command (Update: I've updated the command to better ensure everything is removed.):

$ sudo apt-get purge libmono* cli-common mono-runtime

The command should list all of the packages that will be removed--including applications that depend on mono-- and ask you to confirm their removal. You should review the list carefully before accepting the changes and make sure you won't be removing something you need. You may want to follow that up with:

 $ sudo apt-get autoremove

If you are more comfortable with GUI tools, you can also do this in Synaptic:

  1. Change to the "installed" filter.
  2. Use the quick search box and search for "libmono."
  3. Select all of the packages that appear in the results.
  4. Mark them for complete removal.
  5. Repeat steps 2-4 for the other packages in the command above.
  6. Press apply.

Keeping Mono Off of Your System

While there used to be a package called mononono that would prevent mono from being installed on the system, I do not believe this package works well with recent versions of Ubuntu. If you are truly concerned with keeping mono off of your system, I would simply look carefully at the details of software installs you do and ensure that you do not see it pulling in mono libraries.

One more automatic method would be to using apt-preferences. Putting the following in /etc/apt/preferences or in a file inside /etc/apt/preferences.d/ should provide relatively good defense against installing mono on your system:

Package: cli-common mono-runtime 
Pin: version * 
Pin-Priority: -100

For more information about how this works, see man apt_preferences. The short version is that negative priorities prevent that version of the package from being installed.

Other Notes

If you are very concerned about non-free software, you may find the vrms package of interest. It lists non-free packages on the system. It will not list mono packages since patent issues are orthogonal to the software being free, at least according to some definitions of "free." Also, if you were to list all of the packages that have potential patent issues, you'd have to list a whole lot of packages.

  • 4
    Downvoters should note that I've just answered the users question and have not intended this to be pro- or anti- mono. If you think that this answer is wrong (it could be, I am just a happy user of mono, not an expert), then perhaps a comment or an answer of your own is warranted. – Steven D Sep 15 '10 at 20:57
  • 1
    On the other hand, that downvote did cause you to hit 1000 exactly; maybe they were going for that ;) – Michael Mrozek Sep 15 '10 at 22:36
  • I up voted but it did not work for me, I have receiving a broken package error with a referral to try apt --fix-broken install that is also failing to work. Consequently, I am presently at a dead end with this issue and may be force into a complete wipe of my OS, not being a linux guru. – George Aug 13 '19 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.