Clean install of QGIS in OSX

This is an update to a previous post of the same name, but with more info on actual reinstallation.

QGIS works really well on OSX – but I have had some odd behaviour after trying out dozens of plugins, or messing with Python or Homebrew installations in other parts of the system. The main problem I’ve found is that plugins will crash or not work as expected, rather than QGIS crashing itself. (I’m also running QGIS-2.0-dev and QGIS 1.8.0-2 side-by-side, which might not be the greatest idea which doesn’t seem to cause problems aside from SEXTANTE compatibility).

A. Remove all QGIS data

If you are experiencing weirdness with QGIS and plugins, try this step first, then restart QGIS. However, to make really sure of a clean start, go to step B.

This will remove all your plugins and preferences! I usually make a list of my plugins before deleting them so I can reinstall more quickly. In the terminal, type:

ls -l ~.qgis/python/plugins/ > ~/Desktop/QGIS_Plugins.txt

You’ll see a new file on your desktop which is a list of all the plugins (or at least their directory names) you have downloaded, whether turned on or not.

Remove all the QGIS data – caches, preferences, saved states and all other hidden application data. Copy and paste each of these lines into the terminal (no sudo needed!):

rm ~/Library/Caches/org.qgis.*
rm ~/Library/Preferences/org.qgis.*
rm ~/Library/Saved\ Application\ State/org.qgis.*
rm -r ~/.qgis/

Restart QGIS and reinstall plugins – keep careful track of which plugins you installed and when problems appear!

B. Reinstall

For a complete reinstall, follow the above steps and then reinstall the application itself.

  1. Follow the steps in A.
  2. Delete your old QGIS – drag it to the trash.
  3. Download the latest frameworks from Kyngchaos.
  4. Install the GSL and GDAL frameworks from the .dmg files you downloaded;
  5. Download the latest (or version of your choice) from Kyngchaos. If you want the dev version, try Dakotacarto.
  6. Install QGIS from the new .dmg.