# How to properly remove the CUDAResources paclet?

I have Mathematica 8.0.0.0 installed on my Mac, and while I tried to see what it could do with CUDA, it downloaded a large directory (~1 GB) named CUDAResources-OSX-8.0.0.8 in ~/Library/Mathematica/Paclets/Repository/. However, after the download, I tried to see what it would give but CUDAQ[] returns False on my system. Seeing that CUDA's not going to be useful on this machine, how can I reclaim this disk space? In other words, how to get rid of this downloaded data?

-
Why not try to make it work, contacting WRI if necessary ? –  b.gatessucks Aug 24 '12 at 10:50
@b.gatessucks Most probably the graphics card doesn't support CUDA, here is the list: reference.wolfram.com/mathematica/CUDALink/tutorial/… –  VLC Aug 24 '12 at 11:19

Just check: CUDAResourcesUninstall[]

-
Thanks, sounds great… but it doesn't work! It left my 883 MB CUDAResources-OSX-8.0.0.8 directory untouched… I don't know what it actually did :) –  F'x Aug 24 '12 at 12:33
@F'x I was in your same situation and it worked in my case, I don't have any CUDAResources directory. –  VLC Aug 24 '12 at 13:05

This is somewhat of a long comment on VLC’s answer…

Okay, now I know why CUDAResourcesUninstall[] didn't do the job, though I still don't know how to work around it. Due to updating from 8.0.0.0 to 8.0.4.0 recently, it turns out that the new version of Mma installs a new version of the paclet, named CUDAResources-OSX-8.0.4.1. That's the one that CUDAResourcesUninstall[] then uninstalls. But the older (now useless) 880 MB directory is left in place, unfortunately.

Given that I don't know how to properly remove this stuff, I ended up blasting the entire content of ~/Library/Mathematica/Paclets/Repository (most of which was probably related to the older Mma version). I hope Mma will not have me pay for this. I still don't understand why a minor version upgrade ends up leaving around 1 GB of old stuff on one's account…

-

I found something relevant today (which I don't know if is well-known).

If you're using version 9.0.1, then there is a built-in function PacletUninstall[ ], I guess it can be used to properly remove any paclets which are properly installed. And there are more functions like this. Just check ?PacletManager*.

I discovered them in the installer cdf for Remote Development Kit.

I deleted the "\Paclets\Repository\RemoteDevelopmentKit-0.0.2" folder manually. Later when I tried to re-install it, MMA seemed to think it had already been there. So I guess there is an index or cache or something recording all the installed paclets information, and manually deleting the folder doesn't really uninstall the paclet properly. It should be done like

PacletUninstall["RemoteDevelopmentKit"]
PacletInstall["RemoteDevelopmentKit"]
`