Skip to content

omercangumus/cursor_reset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Cursor Trial Reset Tool — 2026 Edition

A lightweight Python utility that resets Cursor editor's device fingerprint so the application treats your machine as a brand-new device. Tested with the latest Cursor builds (0.45+) — no downgrade required.

Heads-up: This project is for educational and research purposes only. If you rely on Cursor daily, please consider supporting the developers with a paid plan.


What It Does

Cursor identifies your machine through several local fingerprints. When a trial expires or an account gets flagged, these fingerprints are what tie the restriction to your hardware. This script regenerates all of them in one shot:

Target Location What Changes
storage.json globalStorage/storage.json machineId, macMachineId, devDeviceId, sqmId regenerated
state.vscdb (ItemTable) globalStorage/state.vscdb Telemetry rows, session dates & cursorAuth tokens deleted
state.vscdb (cursorDiskKV) globalStorage/state.vscdb Agent/chat history — preserved by default (optionally clearable)
Old backups globalStorage/*.backup_* Oldest backup files pruned to free disk space
Windows Registry HKLM\SOFTWARE\Microsoft\Cryptography MachineGuid regenerated (Windows only)

Before touching anything the script creates timestamped backups. If disk space is critically low, backups are skipped gracefully to avoid errors.


Requirements

  • Python 3.7+ (no external packages — stdlib only)
  • Administrator / sudo access if you want the Registry step to work on Windows (optional)

Quick Start

Option 1 — Clone & Run

git clone https://github.com/omercangumus/cursor-reset2026.git
cd cursor-reset2026
python reset.py

Option 2 — Download & Run Directly

# Windows (PowerShell)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/omercangumus/cursor-reset2026/main/reset.py" -OutFile reset.py
python reset.py
# macOS / Linux
curl -sL https://raw.githubusercontent.com/omercangumus/cursor-reset2026/main/reset.py | python3

Step-by-Step Usage

  1. Sign out of your Cursor account (Settings → Account → Sign Out).
  2. Quit Cursor completely — make sure it's not running in the system tray or as a background process.
  3. Run the script:
    # Windows — open PowerShell as Administrator
    python reset.py
    
    # macOS / Linux
    sudo python3 reset.py
  4. Re-open Cursor and sign in with a new account.

Why Administrator?
On Windows the script also resets MachineGuid in the registry. Without admin rights, that specific step is skipped — everything else still works fine.


How It Works (Under the Hood)

1. storage.json — Telemetry IDs

Cursor stores four device identifiers in a JSON config file:

%APPDATA%\Cursor\User\globalStorage\storage.json          # Windows
~/Library/Application Support/Cursor/User/globalStorage/   # macOS
~/.config/Cursor/User/globalStorage/                       # Linux

The script replaces:

  • telemetry.machineId — random 64-char hex string
  • telemetry.macMachineId — random 64-char hex string
  • telemetry.devDeviceId — new UUID v4
  • telemetry.sqmId — new UUID v4 in {UPPER-CASE} format

2. state.vscdb — SQLite Database

Cursor (0.45+) stores additional telemetry values and authentication tokens inside an SQLite database (state.vscdb) in the same directory. The database has two relevant tables:

ItemTable — rows deleted by this script:

Key Purpose
telemetry.machineId / macMachineId / devDeviceId / sqmId Machine fingerprints
telemetry.firstSessionDate / lastSessionDate / currentSessionDate Session history (makes device look "new")
cursorAuth/accessToken JWT access token for the current account
cursorAuth/refreshToken JWT refresh token for the current account
cursorAuth/cachedEmail / cachedSignUpType / stripeMembershipType / onboardingDate Cached account metadata

cursorDiskKV — agent & chat history (~35,000 rows in typical usage):

  • Preserved by default so you don't lose your conversation history.
  • Can be cleared by setting clear_agent_kv=True in reset_state_db().

3. Old Backup Cleanup

Each run of the script creates .backup_YYYYMMDD_HHMMSS copies of modified files. Over time — especially for state.vscdb which can exceed 1 GB — these accumulate and fill your disk. The cleanup step keeps only the 1 most recent backup per file and removes the rest.

4. Windows Registry — MachineGuid

On Windows, Cursor may also read the hardware GUID at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid

The script writes a fresh UUID there. This step requires elevated privileges and is skipped gracefully on macOS/Linux.


Config File Locations

OS Path
Windows %APPDATA%\Cursor\User\globalStorage\
macOS ~/Library/Application Support/Cursor/User/globalStorage/
Linux ~/.config/Cursor/User/globalStorage/

Troubleshooting

Problem Fix
"Cursor is still running" Close from system tray / taskkill /F /IM cursor.exe / killall Cursor
Registry access denied Run PowerShell / terminal as Administrator
Reset worked but trial still shows expired Make sure you sign in with a different email after resetting
state.vscdb locked error Double-check Cursor is fully closed (no background helpers)
Disk full warning during backup Script skips backup automatically; manually delete old .backup_* files first

Disclaimer

This tool is provided as-is for educational and research purposes. Use it at your own risk. The author is not responsible for any consequences resulting from its use. Please respect software licensing terms.


License

MIT

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages