How to uninstall ChatGPT and the Codex CLI on Windows
OpenAI ships two apps on Windows that this guide covers together: the ChatGPT desktop app from the Microsoft Store, and the Codex command-line tool from winget. They are removed separately and keep their data in different places. Your ChatGPT conversations live in your OpenAI account, not on this PC, so removing the desktop app does not delete them; check that the ones you need open on the ChatGPT website and save any local files you attached. Codex keeps its settings, session history and possibly your saved login in %USERPROFILE%\.codex, which no uninstall touches, so copy config.toml and any history you want from there before you delete it. Your code and repositories stay where they are. This guide covers the ChatGPT desktop app installed per-user from the Microsoft Store (9NT1R1C2HH7J) and Codex installed per-user from the OpenAI.Codex winget package, which winget installs as a portable package.
The two do not share files. In this test the desktop app created no .codex folder and registered nothing for Codex, so you can remove either one and keep the other.
ChatGPT desktop app
Quit ChatGPT first
The Store app currently shows as ChatGPT Classic, runs as ChatGPT Classic.exe (four processes in this test), and adds a startup entry of the same name that was on after the install. Close its window, then check Task Manager (Ctrl+Shift+Esc) for any ChatGPT Classic.exe still listed. If you only want it to stop opening at sign-in, turn it off in Settings › Apps › Startup instead.
Remove the app
Go to Settings › Apps › Installed apps, find ChatGPT Classic, and choose Uninstall, or run:
winget uninstall --id 9NT1R1C2HH7J
A Store app removes itself for your account without an administrator prompt. Windows deletes its data folder, its startup entry, the chatgpt link it registered and its firewall rule "ChatGPT Classic" along with it.
Where its data lives
| Location | What it holds | What to do |
|---|---|---|
%LOCALAPPDATA%\Packages\OpenAI.ChatGPT-Desktop_2p2nqsd0c76g0 |
The app's local settings and cache | Windows removes it with the app |
HKCU\Software\Classes\chatgpt |
The chatgpt link that opens the app |
Windows removes it with the app |
You may also find HKCU\Software\Classes\codex on your PC. It was there before either app was installed in this test and belongs to Windows, not to ChatGPT or Codex; leave it.
Codex CLI
Stop Codex first
Codex has no window or tray icon. Exit any Codex session you have open in a terminal, then check Task Manager for any codex.exe still listed. The test found no startup entry.
If you signed in and want this PC to stop holding your login, run codex logout before removing the program.
Remove it with winget
Settings › Apps lists it as Codex CLI. Since it came from winget as a portable package, remove it the same way:
winget uninstall --id OpenAI.Codex
This removes the package folder and the codex commands winget added. For portable packages winget also offers --purge, which removes every file in the package folder, including anything written there after the install. It does not reach %USERPROFILE%\.codex.
When winget installed Codex it also installed ripgrep (BurntSushi.ripgrep.MSVC) as a dependency. That is a separate app with its own entry, and uninstalling Codex leaves it. Remove it with winget uninstall --id BurntSushi.ripgrep.MSVC only if nothing else you use needs rg.
Where its data lives
| Location | What it holds | What to do |
|---|---|---|
%LOCALAPPDATA%\Microsoft\WinGet\Packages\OpenAI.Codex_Microsoft.Winget.Source_8wekyb3d8bbwe |
The Codex program winget installed | winget removes it with the package |
%USERPROFILE%\.codex |
Settings, session history, logs and possibly your saved login | Back up config.toml and any history you want; remove the folder once you no longer use Codex on this PC |
OpenAI's configuration docs put this folder wherever CODEX_HOME points, if you set it. This test did not sign in or run a session, so %USERPROFILE%\.codex was never created here; it appears once you use Codex.
Check the result
Run these read-only commands after the uninstalls finish, in a new terminal:
Get-Process "ChatGPT Classic", codex -ErrorAction SilentlyContinue
Get-AppxPackage OpenAI.ChatGPT-Desktop
Test-Path "$env:LOCALAPPDATA\Packages\OpenAI.ChatGPT-Desktop_2p2nqsd0c76g0"
winget list --id OpenAI.Codex
Get-Command codex -ErrorAction SilentlyContinue
Test-Path "$env:LOCALAPPDATA\Microsoft\WinGet\Packages\OpenAI.Codex_Microsoft.Winget.Source_8wekyb3d8bbwe"
Test-Path "$env:USERPROFILE\.codex"
winget list --id BurntSushi.ripgrep.MSVC
- No output from
Get-Processonly means this query observed no matching process; a suppressed error leaves the running state unknown. - If
Get-AppxPackagesucceeds without suppressed errors, no output means the desktop app is removed for your account; a listed package means it is still installed. - The first
Test-PathreturningFalsemeans the desktop app's data folder is gone. - If
winget list --id OpenAI.Codexcompletes successfully, no match means the Codex package record is gone; a matching row means the uninstall did not finish. - If
Get-Commandsucceeds without suppressed errors, no output meanscodexno longer resolves. An old terminal keeps its old PATH, so judge from a new one. - The second
Test-PathreturningFalsemeans the Codex package folder is gone;Truemeans files remain there. Test-Path "$env:USERPROFILE\.codex"returningTruemeans your Codex settings and history are still there, which is expected unless you removed them yourself.- The last command printing a row means ripgrep is still installed, which is expected; it is its own app.
Skip the lines for an app you kept.
Account and subscription
Uninstalling either app does not delete your conversations, sign you out on other devices, revoke an API key or cancel a ChatGPT plan. Manage those in your OpenAI account, and keep using ChatGPT in a browser if you like.
What Mole lists
For the ChatGPT desktop app installed from the Microsoft Store, the app row takes its data folder in %LOCALAPPDATA%\Packages with it; nothing else is listed.
For Codex installed per-user from winget, the package folder goes with the app row, and Mole removes it through winget. No other rows are listed, since Codex had written nothing outside its package folder. %USERPROFILE%\.codex is not listed; check it and remove it yourself when you are done with Codex. ripgrep shows as its own app in Mole's list and is not part of the Codex review.
Neither review lists the other app's data, and HKCU\Software\Classes\codex is not listed.
What this test covered
Tested on September 29, 2026 on an ARM64 test VM. The ChatGPT desktop app, version 1.2026.190.0, was installed per-user from the Microsoft Store and opened without signing in; while it was installed and running it added only its data folder, the chatgpt link and the firewall rule, and the check after its removal found none of those three still present. Codex CLI 0.158.0 was installed through winget as a per-user portable package from an elevated session, and its uninstall went through winget, which deleted the package folder. Every listed row was ticked and removed in this test. Not verified: a signed-in desktop app, signing in to Codex or running a session, and the %USERPROFILE%\.codex folder those create.
