﻿# resetEnv

> Restore the initially captured environment

[Next.js](/docs/sdk/nextjs/)

```javascript
resetEnv()
```

## Usage

Removes later values and restores the baseline, preserving Next.js private keys. It does not clear the loaded-file cache; use forceReload on the next loadEnvConfig call to reread files.

```javascript
const nextEnv = require('@dotenvx/next-env')
nextEnv.loadEnvConfig(process.cwd(), true)
nextEnv.resetEnv()
```
