---
title: "PacletInstall"
language: "en"
type: "Symbol"
summary: "PacletInstall[paclet] installs or updates paclet. PacletInstall[task] waits for completion of the task started by a call to PacletInstallSubmit."
keywords: 
- apk
- dpkg
- netpkg
- nix
- pacman
- rpm
- snappy
- steam
- app store
- homebrew
- fink
- macports
- anaconda
- nuget
- maven
- bitnami
- cabal
- cpan
- cran
- gradle
- luarocks
- npm
- pip
- yarn
- pkg
canonical_url: "https://reference.wolfram.com/language/ref/PacletInstall.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Working with Paclets"
    link: "https://reference.wolfram.com/language/guide/Paclets.en.md"
related_functions: 
  - 
    title: "PacletInstallSubmit"
    link: "https://reference.wolfram.com/language/ref/PacletInstallSubmit.en.md"
  - 
    title: "PacletUninstall"
    link: "https://reference.wolfram.com/language/ref/PacletUninstall.en.md"
  - 
    title: "PacletFindRemote"
    link: "https://reference.wolfram.com/language/ref/PacletFindRemote.en.md"
  - 
    title: "PacletSites"
    link: "https://reference.wolfram.com/language/ref/PacletSites.en.md"
  - 
    title: "PacletSiteRegister"
    link: "https://reference.wolfram.com/language/ref/PacletSiteRegister.en.md"
  - 
    title: "CreatePacletArchive"
    link: "https://reference.wolfram.com/language/ref/CreatePacletArchive.en.md"
related_tutorials: 
  - 
    title: "Paclets"
    link: "https://reference.wolfram.com/language/tutorial/Paclets.en.md"
---
# PacletInstall

PacletInstall[paclet] installs or updates paclet.

PacletInstall[task] waits for completion of the task started by a call to PacletInstallSubmit.

## Details and Options

* Paclets can be specified in any of the following ways:

|                            |                                               |
| -------------------------- | --------------------------------------------- |
| "name"                     | name of a paclet at a known paclet site       |
| "name" -> "version"         | a specific version of a paclet                |
| "http :  //. .." or URL[…] | absolute URL of a paclet archive file         |
| File[…]                    | location of a paclet archive file             |
| CloudObject[…]             | cloud object containing a paclet archive file |
| PacletObject[…]            | a reference to a paclet on a paclet site      |

* ``PacletInstall`` returns a paclet object representing the newly installed paclet or the existing paclet if no update occurred, or ``\$Failed`` if no such paclet is available.

* ``PacletInstall`` will update an existing paclet of the same name if a newer version is available.

* ``PacletInstall`` installs paclets into the Repository subdirectory of ``\$UserBasePacletsDirectory``.

* By default, ``PacletInstall`` will look for a named paclet on all paclet sites given by ``PacletSites[]``.

* When ``PacletInstall`` updates a paclet, it will delete the old version if the new one has the same requirements as the old one.

* You can use ``PacletInstall`` on the result of a call to ``PacletInstallSubmit`` to wait for the installation to complete.

* The following options can be given:

|                      |           |                                                                                            |
| -------------------- | --------- | ------------------------------------------------------------------------------------------ |
| AllowVersionUpdate   | True      | whether to update an existing paclet                                                       |
| ForceVersionInstall  | False     | whether to install the given paclet even if it is older than a currently installed version |
| KeepExistingVersion  | Automatic | whether to delete the old version when updating                                            |
| PacletSite           | Automatic | look for the named paclet on a specific paclet site                                        |
| UpdatePacletSites    | Automatic | whether to update paclet information from all known sites before attempting the install    |

---

## Examples (11)

### Basic Examples (5)

Install a paclet from the Wolfram paclet server:

```wl
In[1]:= PacletInstall["ExamplePaclet"]

Out[1]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "2.0", 
  "WolframVersion" -> "12.1+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-2.0"]]
```

---

Install a paclet from a .paclet archive file:

```wl
In[1]:= PacletInstall[FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", "SamplePaclet-1.0.paclet"}]]

Out[1]=
PacletObject[Association["Name" -> "SamplePaclet", "Version" -> "1.0", "WolframVersion" -> "12.1+", 
  "Extensions" -> {{"Kernel", "Root" -> "Kernel", "Context" -> "SamplePaclet`"}}, 
  "Location" -> "/Users/arnoudb/Library/Mathematica/Paclets/Repository/SamplePaclet-1.0"]]
```

---

If the paclet is already installed, and no update is available, the existing installed paclet is returned:

```wl
In[1]:= PacletInstall["JLink"]

Out[1]=
PacletObject[Association["Name" -> "JLink", "Version" -> "4.9.1", 
  "Extensions" -> {{"Kernel", "Context" -> "JLink`"}, {"Documentation", "Language" -> All, 
     "Resources" -> {"Guides/JavaInterface"}}, {"Documentation", "Language" -> All, 
     ... b"}, 
       {"ExamplePages/Part1/Spirograph", "../Examples/Part1/Spirograph.nb"}, 
       {"ExamplePages/Part1/Scribble", "../Examples/Part1/Scribble.nb"}}}}, 
  "Location" -> "/Applications/Mathematica12.1.app/Contents/SystemFiles/Links/JLink"]]

In[2]:= %["Location"]

Out[2]= "/Applications/Mathematica12.1.app/Contents/SystemFiles/Links/JLink"
```

---

Install a specific version (the server has both 1.0 and 2.0 versions, and 2.0 would be installed by default):

```wl
In[1]:= Quiet[PacletUninstall["ExamplePaclet"]]

In[2]:= PacletInstall["ExamplePaclet" -> "1.0"]

Out[2]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "1.0", 
  "WolframVersion" -> "12.0+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-1.0"]]
```

---

No paclet of this name can be found on any known paclet site:

```wl
In[1]:= PacletInstall["DoesntExist"]
```

PacletInstall::notavail: No paclet named DoesntExist is available for download from any currently enabled paclet sites.

```wl
Out[1]= $Failed
```

### Options (5)

#### AllowVersionUpdate (1)

Uninstall any existing version of ``ExamplePaclet`` :

```wl
In[1]:= PacletUninstall["ExamplePaclet"];
```

Now install Version 1.0 from the Wolfram paclet server:

```wl
In[2]:= PacletInstall["ExamplePaclet" -> "1.0"]

Out[2]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "1.0", 
  "WolframVersion" -> "12.0+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-1.0"]]
```

``ExamplePaclet`` also has a 2.0 version on the server, but the ``AllowVersionUpdate -> False`` option will prevent your local copy from being updated:

```wl
In[3]:= PacletInstall["ExamplePaclet", AllowVersionUpdate -> False]

Out[3]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "1.0", 
  "WolframVersion" -> "12.0+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-1.0"]]
```

#### ForceVersionInstall (1)

Uninstall any existing version of ``ExamplePaclet`` :

```wl
In[1]:= PacletUninstall["ExamplePaclet"]
```

This will install Version 2.0 (the highest available version) from the Wolfram paclet server:

```wl
In[2]:= PacletInstall["ExamplePaclet"]

Out[2]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "2.0", 
  "WolframVersion" -> "12.1+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-2.0"]]
```

Attempts to install an older version will fail:

```wl
In[3]:= PacletInstall["ExamplePaclet" -> "1.0"]
```

PacletInstall::newervers: A paclet named ExamplePaclet with a newer version number (2.0) is already installed. If you wish to install an older version, use PacletUninstall to remove the existing version first, or call PacletInstall with ForceVersionInstall->True.

```wl
Out[3]= $Failed
```

Use ``ForceVersionInstall`` to allow installing an older version when a newer one is already installed:

```wl
In[4]:= PacletInstall["ExamplePaclet" -> "1.0", ForceVersionInstall -> True]

Out[4]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "1.0", 
  "WolframVersion" -> "12.0+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-1.0"]]
```

#### KeepExistingVersion (1)

Uninstall any existing version of ``ExamplePaclet`` :

```wl
In[1]:= PacletUninstall["ExamplePaclet"]
```

Now install Version 1.0 from the Wolfram paclet server:

```wl
In[2]:= PacletInstall["ExamplePaclet" -> "1.0"]

Out[2]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "1.0", 
  "WolframVersion" -> "12.0+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-1.0"]]
```

``ExamplePaclet`` also has a 2.0 version on the server, and the ``KeepExistingVersion -> True`` option will prevent your 1.0 version from being deleted when the 2.0 version is installed:

```wl
In[3]:= PacletInstall["ExamplePaclet", KeepExistingVersion -> True]

Out[3]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "2.0", 
  "WolframVersion" -> "12.1+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-2.0"]]
```

Both versions are present:

```wl
In[4]:= PacletFind["ExamplePaclet"]

Out[4]=
{PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "2.0", 
  "WolframVersion" -> "12.1+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Pacle ... "ExamplePaclet", "Version" -> "1.0", 
  "WolframVersion" -> "12.0+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-1.0"]]}
```

#### PacletSite (1)

Use the ``PacletSite`` option to obtain a paclet from the specified site without registering the site as a permanent known site:

```wl
In[1]:= PacletInstall["MyPaclet", PacletSite -> "http://mycompany.com/MyPacletSite"];
```

The site used is not present in the list of known paclet sites:

```wl
In[2]:= PacletSites[]

Out[2]= {PacletSiteObject[<|"URL" -> "http://pacletserver.wolfram.com", "Name" -> "", "Local" -> False, "Type" -> "Server"|>]}
```

#### UpdatePacletSites (1)

Use ``UpdatePacletSites -> True`` to ensure that you have the latest information about what paclets are available from all known paclet sites:

```wl
In[1]:= PacletInstall["ExamplePaclet", UpdatePacletSites -> True]

Out[1]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "2.0", 
  "WolframVersion" -> "12.1+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-2.0"]]
```

### Properties & Relations (1)

If an asynchronous installation is initiated by a call to ``PacletInstallSubmit``, you can choose to wait for the task to complete by calling ``PacletInstall`` on the task object:

```wl
In[1]:=
PacletUninstall["ExamplePaclet"];
task = PacletInstallSubmit["ExamplePaclet"];
```

The task will finish in the background, but if you want to wait until it is done, use the following:

```wl
In[2]:= PacletInstall[task]

Out[2]=
PacletObject[Association["Name" -> "ExamplePaclet", "Version" -> "2.0", 
  "WolframVersion" -> "12.1+", "Extensions" -> 
   {{"Kernel", "Root" -> "Kernel", "Context" -> "ExamplePaclet`"}}, 
  "Location" -> "/Users/tgayley/Library/Mathematica/Paclets/Repository/ExamplePaclet-2.0"]]
```

## See Also

* [`PacletInstallSubmit`](https://reference.wolfram.com/language/ref/PacletInstallSubmit.en.md)
* [`PacletUninstall`](https://reference.wolfram.com/language/ref/PacletUninstall.en.md)
* [`PacletFindRemote`](https://reference.wolfram.com/language/ref/PacletFindRemote.en.md)
* [`PacletSites`](https://reference.wolfram.com/language/ref/PacletSites.en.md)
* [`PacletSiteRegister`](https://reference.wolfram.com/language/ref/PacletSiteRegister.en.md)
* [`CreatePacletArchive`](https://reference.wolfram.com/language/ref/CreatePacletArchive.en.md)

## Tech Notes

* [Paclets](https://reference.wolfram.com/language/tutorial/Paclets.en.md)

## Related Guides

* [Working with Paclets](https://reference.wolfram.com/language/guide/Paclets.en.md)

## Related Links

* [Wolfram Language Paclet Repository](https://resources.wolframcloud.com/PacletRepository)

## History

* [Introduced in 2020 (12.1)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn121.en.md)