# Delete Package

> Deletes a package from the root point.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/package-functions/delete-package/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

Deletes a package from the root point.

## Syntax

Public Function **DeletePackage**(ByVal **PackageName** As String, ByVal **PackageVersion** As String, ByVal **UnitType** As String, ByVal **Force** As Boolean) As Boolean

## Parameters

***PackageName (String)***

The name of the package.

***PackageVersion (String)***

The package Version.

***PackageType (String)***

The package type;

- 1 (Computer)
- 2 (User)

***Force (Boolean)***

Force deletion of the package regardless of any linked units, groups, or business units

## Return value

Boolean. The function returns true if the package is deleted, otherwise false.

:::note[Important]
The function will fail if the package is promoted to any child point
:::

## Example

**VBScript**

|                                                                                                                                                                                          |
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ```java<br/>Set oCMS = CreateObject("CapaInstaller.SDK")<br/>wscript.echo oCMS.SetInstanceManagementPoint("1")<br/>wscript.echo oCMS.DeletePackage("Winrar","v3.0","1",True)<br/><br/>``` |
