SPAppInstance.Uninstall method

Removes app instances that are either initialized or installed.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function Uninstall As Guid
'Usage
Dim instance As SPAppInstance
Dim returnValue As Guid

returnValue = instance.Uninstall()
public Guid Uninstall()

Return value

Type: System.Guid
An identifier that serves as an asynchronous handle.

Remarks

If the app instance is initialized, this method deletes it and an empty Guid value is returned. If the app instance is installed, this method queues an SPAppInstance object for uninstallation. The app instance will be uninstalled as soon as the farm is able to perform the operation. The uninstall operation is asynchronous; the identifier that is returned can be used to query progress of an installation. Uninstallation will not proceed unless the timer service is running on at least one machine in the farm. This method requires the caller to be a SharePoint site administrator on the site specified by the site URL.

See also

Reference

SPAppInstance class

SPAppInstance members

Microsoft.SharePoint.Administration namespace