> ## Documentation Index
> Fetch the complete documentation index at: https://etherspot.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Uninstall Module Details

<Info>
  This page will contain detailed information on how to uninstall a module from the Modular Wallet and how to prepare deinitData for module installation
</Info>

## Install Module

Module can be installed on a Etherspot Modular wallet with some pre-requisite checks before transaction is sent to bundler

1. Module is not installed yet on the wallet
2. Module is a valid contract address

## Uninstall Module

1. Module can be uninstalled from wallet via `uninstall` SDK function
2. Module uninstallation is associated with deinitData which contains the data needed to complete module removal from wallet storage
   * previous module address
   * optional module specific deinit data which is used during uninstall process

### Get deinitData

* Uninstallation needs deinitData which has 2 essential components:
  1. previous module address

  2. module specific deinitData (this is an optional argument and replaced by default deinitData if there is no need of module specific data)
  * DeinitData can be generated using the SDK helperfunction: [generateModuleDeInitData](https://github.com/etherspot/etherspot-modular-sdk/blob/master/src/sdk/sdk.ts#L286-L288)
    * moduleType
    * module (moduleAddress)
    * moduleDeInitData (module specific deInitData or defaulted deinitData - `0x00`)
  * Example to generate DeinitData and uninstall is at: [module-uninstall-example](https://github.com/etherspot/etherspot-modular-sdk/blob/master/examples/12-uninstall-module.ts#L29-L34)

If you want to take a look at the SDK code in more detail then you can check these functions out [here on Github](https://github.com/etherspot/etherspot-modular-sdk/blob/master/src/sdk/sdk.ts).
