# Modifying an existing module

Description: How to modify an existing Ignition Module

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/ignition/docs/guides/modifications.mdx

  Components used in this page:
    - <Run cmd="..."/>: Runs a command in the terminal with npm/pnpm/yarn.
    - :::tip: A helpful tip callout block. Supports custom title `:::tip[Title]` and icon `:::tip{icon="name"}` syntax.

import Run from "@hh/Run.astro";

It's possible to make changes to modules after having deployed them.

For example, if we wanted to add a new `Rocket` contract instance to the module we deployed in the [Quick Start guide](/ignition/docs/getting-started#quick-start), this is what we would do:

```ts
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";

export default buildModule("Apollo", (m) => {
  const apollo = m.contract("Rocket", ["Saturn V"]);

  m.call(apollo, "launch", []);

  const artemis = m.contract("Rocket", ["Artemis 2"], { id: "artemis" });

  m.call(artemis, "launch", []);

  return { apollo, artemis };
});
```

Then run it again. Hardhat Ignition will continue from where it left off, and execute the new parts of the module.

<Run command="hardhat ignition deploy ignition/modules/Apollo.ts --network localhost" />

This is what the output would look like:

```
Batch #1
  Executed Apollo#artemis

Batch #2
  Executed Apollo#Apollo.artemis.launch


[ Apollo ] successfully deployed 🚀

Deployed Addresses

Apollo#Rocket - 0x5fbdb2315678afecb367f032d93f642f64180aa3
Apollo#artemis - 0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0
```

We can see two new batches that execute the new parts of the module, while keeping the previous already deployed parts intact.

## Incompatible modifications

There are certain modifications one can make to a `Future` definition that would make the new version incompatible with the previous one _if_ the previous one has already been partially or completely executed. This would lead to Hardhat Ignition being unable to continue your deployment from where it was left off. Read the [Reconciliation](/ignition/docs/explanations/reconciliation) guide to learn more about this.

## Clearing an existing deployment with reset

In the above case, or if you simply want to start over, you can use the `--reset` option to clear the previous deployment and start from scratch:

<Run command="hardhat ignition deploy ignition/modules/Apollo.ts --network localhost --reset" />

:::tip

When using `--reset` on a network other than Hardhat Network (i.e. mainnet, testnets, etc.), Hardhat Ignition will ask you to confirm that you want to clear the previous deployment before proceeding.

:::
