# Upgrade your PFN

This document outlines the process for updating your PFN with new Aptos releases. All PFNs will need to be updated when new releases are available. For PFNs running in `devnet`, an additional data wipe step is required as `devnet` is wiped on every new release.

### Source code deployment

If you run your PFN from the [aptos-core](https://github.com/aptos-labs/aptos-core.git) source code, you can update your PFN by following these steps:

1. Stop your PFN by running the command below (or killing the `aptos-node` process manually):

   ```
   cargo stop aptos-node
   ```
2. Fetch the latest release appropriate for your network, e.g., `devnet`, `testnet`, or `mainnet`. Be sure to replace `[network_branch]` with the appropriate branch name below:

   ```
   git checkout [network_branch] && git pull
   ```
3. Rebuild the binary as you did during the initial setup.
4. If your PFN is running in `devnet`, follow the additional steps in the [Data Wipe and Reset](https://aptos.dev/en/network/nodes/full-node/modify/update-fullnode-with-new-releases#upgrade-with-data-wipe-devnet-only) section below.
5. Restart your PFN by running the same deployment command as before. For example:

   ```
   cargo run -p aptos-node --release -- -f ./fullnode.yaml
   ```

#### (Devnet) Data Wipe and Reset<br>

{% hint style="info" %}
**Devnet only wipe**\
Only follow these additional steps if your PFN is running in `devnet`. Other networks (e.g., `testnet` and `mainnet`) don’t require this step (as data is never wiped)!
{% endhint %}

If your PFN is running in `devnet`, follow these additional steps after stopping your PFN (and before restarting it!):

1. Delete the data folder (the directory path is what you specified in the configuration file, e.g., `fullnode.yaml`).
   * The default data folder is `/opt/aptos/data`.
2. Delete the `genesis.blob` file and `waypoint.txt` file (depending on how you configured it, you might not have this file and may instead have a `waypoint` directly in your configuration file).
3. Download the new [genesis.blob](https://aptos.dev/en/network/nodes/configure/node-files-all-networks/node-files-mainnet#genesisblob) file and the new [waypoint](https://aptos.dev/en/network/nodes/configure/node-files-all-networks/node-files-mainnet#waypointtxt).
4. Update the configuration file (e.g., `fullnode.yaml`) with the new genesis.blob and waypoint files.
5. Restart your PFN by running the same deployment command as before.
