# CMS_UninstallPackageFromUnitById

> Uninstalls package from unit.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/cms-functions/cms-uninstallpackagefromunitbyid/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Uninstalls package from unit

### Syntax

**VBScript**

```vb
CMS_UninstallPackageFromUnit(sID as string) As Boolean
```

**PowerShell**

```powershell
[bool]CMS_UninstallPackageFromUnit -packageid <string>
```

### Parameters

#### sID (String)

ID of the package (JobId from the JOB table)

### Return value

**VBScript**

Boolean, TRUE if function completed successfully.

**PowerShell**

Boolean, TRUE if function completed successfully.

### Example

**VBScript**

```vb
If bStatus Then bStatus = CMS_UninstallPackageFromUnitById("126")
```

**PowerShell**

```powershell
if (CMS_UninstallPackageFromUnitById '126') {
  $cs.Job_WriteLog("Uninstall", "Package (126) will be uninstalled")
}
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[CMS_UninstallPackageFromUnit](/capainstaller/vb-scripting-library/cms-functions/cms-uninstallpackagefromunit/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/) [Business Unit support](/capainstaller/vb-scripting-library/addendum/business-unit-support/)
