pact reset & nuke
Remove symlinks and clean up Pact installation
pact reset & nuke
Commands for cleaning up your Pact installation.
pact reset
Remove all symlinks created by Pact, but keep the .pact/ directory.
pact resetWhat it Does
- Reads your
pact.jsonconfiguration - Finds all targets that were symlinked
- Removes the symlinks
When to Use
- You want to temporarily disable Pact-managed configs
- You're switching to a different configuration system
- You need to test something with default configs
Example
$ pact reset
Removing symlinks...
✓ Removed ~/.zshrc
✓ Removed ~/.config/nvim
✓ Removed ~/.gitconfig
3 symlinks removedAfter reset, you can restore everything with pact sync.
pact nuke
Complete removal of Pact from your system.
pact nuke [flags]Flags
| Flag | Type | Description |
|---|---|---|
-f, --force | bool | Skip confirmation prompt |
What it Does
- Removes all symlinks (like
pact reset) - Deletes the
.pact/directory - Removes your GitHub token from keychain
Warning
pact nuke is destructive! It removes:
- All symlinked configs
- Your local
.pact/clone - Your GitHub token
Your my-pact repo on GitHub is not affected.
Example
$ pact nuke
⚠️ This will:
• Remove all symlinks
• Delete .pact/ directory
• Remove GitHub token from keychain
Your my-pact repo on GitHub will NOT be deleted.
Are you sure? (y/N): y
Removing symlinks...
✓ Removed ~/.zshrc
✓ Removed ~/.config/nvim
Deleting .pact/...
✓ Removed .pact/
Removing token from keychain...
✓ Token removed
✓ Pact removed from this machineForce mode
Skip the confirmation:
pact nuke --forceor
pact nuke -fRecovery After Nuke
If you accidentally ran pact nuke, recovery is easy:
# Re-initialize (will re-authenticate and clone your repo)
pact init
# Re-apply all configs
pact syncYour configurations are safe on GitHub — nuke only affects the local machine.
Comparison
| Action | reset | nuke |
|---|---|---|
| Remove symlinks | ✓ | ✓ |
| Delete .pact/ | ✗ | ✓ |
| Remove token | ✗ | ✓ |
Recoverable with pact sync | ✓ | ✗ (need pact init) |
Use Cases
Testing default configs
pact reset
# Test with system defaults
pact sync # Restore pact configsMoving to a new project
cd old-project
pact reset
cd ../new-project
pact init
pact syncComplete fresh start
pact nuke -f
pact init
pact syncSwitching GitHub accounts
pact nuke
# Log in with new GitHub account
pact init