3.8 KiB
Removing TORCH from a Project
This guide covers how to completely remove TORCH from a project repository that installed it via the standard installation process (npm install <torch-tarball> && npx torch-lock init).
Quick Removal (Recommended)
Run the built-in removal command from your project root:
npx torch-lock remove
This will:
- Detect your TORCH installation (whether installed to
torch/or to the project root) - Show a list of all artifacts that will be removed
- Ask for confirmation before deleting anything
- Remove all TORCH files, directories, configuration, and the npm package
To skip the confirmation prompt:
npx torch-lock remove --force
What Gets Removed
The remove command cleans up everything that torch-lock init created, plus any runtime artifacts:
| Artifact | Description |
|---|---|
torch/ |
The main TORCH install directory (contains src, bin, dashboard, scripts, prompts, etc.) |
torch-config.json |
TORCH configuration file at the project root |
.torch/ |
Hidden directory for prompt history tracking |
.scheduler-memory/ |
Runtime memory store used by the memory subsystem |
task-logs/ |
Scheduler run logs (daily/weekly cycle logs, relay health history) |
src/proposals/ |
Governance proposals directory |
torch:* scripts in package.json |
Convenience scripts injected into the host project's package.json |
node_modules/torch-lock/ |
The installed npm package |
Manual Removal
If you prefer to remove TORCH manually, or if the remove command is unavailable (e.g., the package was already uninstalled), follow these steps from your project root:
1. Remove the TORCH directory
rm -rf torch/
2. Remove TORCH configuration
rm -f torch-config.json
3. Remove hidden directories
rm -rf .torch/
rm -rf .scheduler-memory/
4. Remove runtime logs
rm -rf task-logs/
5. Remove governance proposals (if empty/unused)
# Only remove if this directory was created by TORCH and contains no user content
rm -rf src/proposals/
# Remove src/ too if it's now empty
rmdir src/ 2>/dev/null
6. Clean up package.json scripts
Remove these keys from the "scripts" section of your package.json:
{
"torch:dashboard": "...",
"torch:check": "...",
"torch:lock": "...",
"torch:health": "...",
"torch:memory:list": "...",
"torch:memory:inspect": "..."
}
7. Uninstall the npm package
npm uninstall torch-lock
8. Clean up environment variables (if set)
If you configured TORCH environment variables in your shell profile, CI, or .env files, remove them:
NOSTR_LOCK_NAMESPACENOSTR_LOCK_HASHTAGNOSTR_LOCK_RELAYSNOSTR_LOCK_TTLNOSTR_LOCK_QUERY_TIMEOUT_MSNOSTR_LOCK_PUBLISH_TIMEOUT_MSNOSTR_LOCK_MIN_SUCCESSFUL_PUBLISHESNOSTR_LOCK_RELAY_FALLBACKSNOSTR_LOCK_MIN_ACTIVE_RELAY_POOLNOSTR_LOCK_DAILY_ROSTERNOSTR_LOCK_WEEKLY_ROSTERTORCH_CONFIG_PATHTORCH_DASHBOARD_AUTHTORCH_MEMORY_ENABLEDTORCH_MEMORY_INGEST_ENABLEDTORCH_MEMORY_RETRIEVAL_ENABLEDTORCH_MEMORY_PRUNE_ENABLEDAGENT_PLATFORM
9. Optional: Remove generated reports
If you ran lock reliability reports, you may also want to remove:
rm -rf artifacts/lock-reliability/
Verifying Complete Removal
After removal, verify no TORCH artifacts remain:
# Should return no results
ls torch/ 2>/dev/null
ls .torch/ 2>/dev/null
ls .scheduler-memory/ 2>/dev/null
ls torch-config.json 2>/dev/null
# Should not contain torch-lock
npm ls torch-lock 2>/dev/null
# Should not contain torch:* scripts
grep '"torch:' package.json
Re-installing TORCH
If you want to re-install TORCH later:
npm install https://github.com/PR0M3TH3AN/TORCH/archive/<commit-sha>.tar.gz --force && npx torch-lock init