I downloaded a Mathematica package. It came as a file with the .paclet extension. How can I install or uninstall it?
Answer
This answer is for people who are not interested in package development, and just need to install a Mathematica package which they obtained as a .paclet file.
Note: Before using the functions in this guide, it may be necessary to evaluate Needs["PacletManager`"]. Specifically, this is needed when your notebooks's default context is set to "Unique to This Notebook".
Installing
Packages distributed as paclets can be installed using the PacletInstall function. Evaluate this function with its argument the full path to the downloaded .paclet file.
For example, if SomePackage-1.0.0.paclet was downloaded into the ~/Downloads directory, then evaluate
PacletInstall["~/Downloads/SomePackage-1.0.0.paclet"]
You may use Insert → File Path... to easily insert the path to this file.
Getting information
.paclet files are typically named as SomePackage-1.0.0.paclet. Here SomePackage is the paclet name and 1.0.0 is its version. To get information about the active version of a currently installed paclet, use PacletInformation with its name:
PacletInformation["SomePackage"]
To list all installed versions of a paclet, use
PacletFind["SomePackage"]
Typically the latest version will be the active one. This is listed first by PacletFind.
Uninstalling
To uninstall all versions of a paclet named SomePackage, use
PacletUninstall["SomePackage"]
Warning: Mathematica uses many system paclets. Do not attempt to uninstall these. Only uninstall paclets that you have installed yourself.
Paclets with documentation
Packages that come with documentation may show up in the Documentation Center's Add-ons browser. Open the Documentation through the Help menu and look for the Add-ons and Packages link in the lower right corner:

Clicking it will show a list of those installed packages (both paclets and traditional ones) that come with documentation. The list may have buttons for opening the package's documentation or for uninstalling it.
Information for developers
If you are looking to distribute your own packages as paclets, read the following threads:
Comments
Post a Comment