Claude Account Banned? Cleaning Up Your Local Environment Really Matters
·(edited)· / , , , , · reads0
AI TranslationSimplified ChineseEnglish
After the ban
My Claude account got caught in October’s wave of bans. I was using my own Gmail address and paying for the subscription with iOS gift cards, and I’d never had any problems before. Losing the account was pretty frustrating.
I then tried creating new accounts with Outlook and Gmail, but almost every time, I got a KYC identity check as soon as I signed in. There was another annoying issue: I’d click the login link in the email, get redirected twice, and end up back on the login page. When I requested another link and tried again, it asked me to verify my identity. I suspected my computer still had data from the old account, but that’s just a guess.
So I found a few tutorials and cleared the saved login state, cache, and browser site data. As of this writing, the new Pro account has been working fine for seven days. I’m documenting the process for now. Did the cleanup actually help? All I can say is that it’s better than nothing. In my experience, new accounts inevitably get banned if you don’t clean up the environment first, and the new rules dated November 12 do provide a basis for these bans.
Warning
The steps below are for macOS. The tool doesn’t currently support cleanup on Windows or Linux. Cleaning up local data won’t reverse a ban or guarantee that a new account won’t be linked to the old one. Back up your data first, then quit Claude Desktop and Claude Code normally.
Back up first, then clean up
1. Back up your data
I used claude-ban-clean. Plenty of people on X recommend it, too. By default, it preserves conversation history and configurations for Skills, Hooks, MCP, and so on. Still, make your own backup first and store it outside the directories you’ll be cleaning:
BASH
mkdir -p ~/ClaudeManualBackup
tar czf ~/ClaudeManualBackup/claude-$(date +%F-%H%M%S).tgz \
-C "$HOME" .claude .claude.json
ls -lh ~/ClaudeManualBackup/
Make sure the command finishes without errors, then run tar tzf 备份文件路径 to inspect the archive’s contents. If a path doesn’t exist, check where the files actually are—don’t ignore the error. The backup may contain tokens and personal information.
2. Clear the cache and old login state
Project: claude-ban-clean. Check the repository’s README for the exact list of files it supports.
If this directory already exists, inspect it first rather than overwriting it. Once the tool is installed, start a new session in Codex and ask it to check things first:
CodeBlock Loading...
You can also run it yourself in the terminal. First, switch to the repository directory. For example, this command only checks files; it doesn’t delete anything:
BASH
cd ~/.codex/skills/claude-ban-clean
python3 scripts/cleanup.py --scope cache --scope account
cache clears caches and logs; account clears the specified old account fields and credentials. You’ll need to sign in again afterward. Conversation history, machineID, and userID are outside the scope of this cleanup.
Review the list, make sure all Claude applications have been closed, then run:
The tool creates a backup first, then asks you to manually type CONFIRM in the terminal. Backups are stored in ~/ClaudeBackups/claude-ban-clean-*, and removed files go to the Trash. When it finishes, check report.json. If the status is partial-or-stopped, the process stopped partway through. Check the report before running it again.
3. Clear browser site data
This tool doesn’t clean up Chrome, so you’ll need to do that manually:
Close any Claude-related tabs, then open Chrome settings and find “Site data” or “View all site data and permissions.”
Search separately for claude.ai, claude.com, and anthropic.com. Check the results, then delete the data for those sites.
If you’ve signed in to Claude using multiple Chrome profiles, check each one.
4. Other leftover data: don’t skip this
I think the following steps are key to avoiding KYC checks on new accounts.
Machine identifiers: The SegmentFault article notes that Claude Code keeps using the values in ~/.claude.json for machineID and userID. Signing out doesn’t reset them.claude-ban-clean explicitly leaves these two fields unchanged as well. What to do: Clean ~/.claude.json of old account fields, then generate two new random 32-byte hex strings to use as machineID and userID. You can have an agent handle this step.
Keychain: You must explicitly delete the entries the CLI stores in the system keychain:
Claude Code-credentials
Claude Safe Storage
Browser native messaging:
In the Chrome directory, the com.anthropic.* host files must be removed.
Desktop plist files and recent-item history:
ByHost directory: clear its com.anthropic.claudefordesktop.*.plist files, as well as the system’s sfl3 and sfl4 recent-document records.
Keep browser environments separate:
Don’t sign in to Claude with the personal Chrome profile you use every day. Create a separate, clean profile—for example, “Claude Only.”
If you reuse the same profile, the login page may detect the previously banned account right after you create a new one, triggering a KYC check as soon as you sign in.
On your phone: If you used the old account there, the tutorials recommend deleting the Claude app and then reinstalling it.
What happens next
So far, the account hasn’t been banned while using my home internet IP address. We’ll see what happens when the new policy takes effect tomorrow. If you need this, you can try the cleanup and see whether your new account can still be linked to the old one. If mine gets banned along the way, I’ll accept it.
After the ban
My Claude account got caught in October’s wave of bans. I was using my own Gmail address and paying for the subscription with iOS gift cards, and I’d never had any problems before. Losing the account was pretty frustrating.
I then tried creating new accounts with Outlook and Gmail, but almost every time, I got a KYC identity check as soon as I signed in. There was another annoying issue: I’d click the login link in the email, get redirected twice, and end up back on the login page. When I requested another link and tried again, it asked me to verify my identity. I suspected my computer still had data from the old account, but that’s just a guess.
So I found a few tutorials and cleared the saved login state, cache, and browser site data. As of this writing, the new Pro account has been working fine for seven days. I’m documenting the process for now. Did the cleanup actually help? All I can say is that it’s better than nothing. In my experience, new accounts inevitably get banned if you don’t clean up the environment first, and the new rules dated November 12 do provide a basis for these bans.
The steps below are for macOS. The tool doesn’t currently support cleanup on Windows or Linux. Cleaning up local data won’t reverse a ban or guarantee that a new account won’t be linked to the old one. Back up your data first, then quit Claude Desktop and Claude Code normally.
Back up first, then clean up
1. Back up your data
I used claude-ban-clean. Plenty of people on X recommend it, too. By default, it preserves conversation history and configurations for Skills, Hooks, MCP, and so on. Still, make your own backup first and store it outside the directories you’ll be cleaning:
Make sure the command finishes without errors, then run tar tzf 备份文件路径 to inspect the archive’s contents. If a path doesn’t exist, check where the files actually are—don’t ignore the error. The backup may contain tokens and personal information.
2. Clear the cache and old login state
Project: claude-ban-clean. Check the repository’s README for the exact list of files it supports.
If this directory already exists, inspect it first rather than overwriting it. Once the tool is installed, start a new session in Codex and ask it to check things first:
You can also run it yourself in the terminal. First, switch to the repository directory. For example, this command only checks files; it doesn’t delete anything:
cache clears caches and logs; account clears the specified old account fields and credentials. You’ll need to sign in again afterward. Conversation history, machineID, and userID are outside the scope of this cleanup.
Review the list, make sure all Claude applications have been closed, then run:
The tool creates a backup first, then asks you to manually type CONFIRM in the terminal. Backups are stored in ~/ClaudeBackups/claude-ban-clean-*, and removed files go to the Trash. When it finishes, check report.json. If the status is partial-or-stopped, the process stopped partway through. Check the report before running it again.
3. Clear browser site data
This tool doesn’t clean up Chrome, so you’ll need to do that manually:
4. Other leftover data: don’t skip this
I think the following steps are key to avoiding KYC checks on new accounts.
What happens next
So far, the account hasn’t been banned while using my home internet IP address. We’ll see what happens when the new policy takes effect tomorrow. If you need this, you can try the cleanup and see whether your new account can still be linked to the old one. If mine gets banned along the way, I’ll accept it.
References: