# UninstallAction

Import: `import com.install4j.api.actions.UninstallAction;`

```java
interface UninstallAction extends Action
```

All uninstall actions must implement this interface. You have to override all methods and provide a public constructor with no arguments.
It is recommended that you choose one of the derived abstract classes as a superclass.

## Inherited from

- [Action](Action.md) — 1 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`uninstall(UninstallerContext)`](#uninstall-uninstallercontext) | `boolean` | This method is called by the framework to perform the action during uninstallation. |

### uninstall(UninstallerContext)

```java
boolean uninstall(UninstallerContext context) throws UserCanceledException
```

This method is called by the framework to perform the action during uninstallation.
You can use the `ProgressInterface` available from `context.getProgressInterface()`
in order to display messages to the user or ask simple questions.


**Parameters:**

- `context` — the context of the uninstallation.

**Returns:** should return `true` if successful. If it returns `false`, the error message and the
failure strategy for the action configured in the install4j GUI will be used by the uninstaller.

**Throws:**

- `UserCanceledException` — You can let
these exceptions pass through, they will be handled by the framework.

