TSI Maintenance Guide
Repairing TSI Installation
If your TSI installation is broken or outdated, you can repair it using the bootstrap installer with the --repair option.
When to Use Repair Mode
- TSI binary is corrupted or missing
- TSI is outdated and you want to update
- TSI stopped working after system updates
- You want to rebuild TSI with a different compiler
Repair Installation
One-line repair:
curl -fsSL https://raw.githubusercontent.com/PanterSoft/tsi/main/tsi-bootstrap.sh | sh -s -- --repair
Local repair:
Custom prefix:
What Repair Does
- Detects existing installation: Checks if TSI is already installed
- Checks for source updates:
- If source is a git repository: Fetches and checks for remote changes
- If source has changed: Updates using
git pullor re-downloads - If source is up to date: Uses existing source
- Rebuilds TSI: Downloads pre-built binary from GitHub releases, or builds from source with
cargo build --release - Reinstalls: Copies new binary and completion scripts to installation directory
Repair Process
The repair mode will:
- ✅ Check for source updates: Automatically detects if source code has changed
- ✅ Update source if needed: Uses git pull for git repositories, or re-downloads if needed
- ✅ Rebuild TSI: Compiles fresh binary from updated source
- ✅ Preserve all data:
- Package database (~/.tsi/db/)
- Installed packages (~/.tsi/install/)
- Package repository (~/.tsi/packages/)
- Downloaded sources (~/.tsi/sources/)
- ✅ Only replace: TSI binary and completion scripts
Uninstalling TSI
Uninstall with tsi remove
If TSI is already installed and on your PATH, you can uninstall it with:
You will be asked to confirm. This removes the entire installation prefix (binary, completions, package database, and all installed packages). To skip the prompt (e.g. in scripts), use --yes. For a custom prefix, use --prefix /path/to/tsi.
Full Uninstall (Bootstrap)
If you installed via the bootstrap script, use it to remove TSI completely:
curl -fsSL https://raw.githubusercontent.com/PanterSoft/tsi/main/tsi-bootstrap.sh | sh -s -- --uninstall
Custom prefix:
curl -fsSL https://raw.githubusercontent.com/PanterSoft/tsi/main/tsi-bootstrap.sh | sh -s -- --uninstall --prefix /opt/tsi
Non-interactive (no confirmation prompt):
UNINSTALL=1 curl -fsSL https://raw.githubusercontent.com/PanterSoft/tsi/main/tsi-bootstrap.sh | sh -s -- --uninstall --non-interactive
This removes the entire installation directory (binary, completions, package database, installed packages, and all data).
Full Uninstall (Makefile)
If you installed from source with make install, you can remove only the TSI binary and completions:
To remove the entire prefix including all TSI data (db, installed packages, etc.), delete the directory:
Basic Uninstall (Preserve Data)
Remove TSI binary and completion scripts, but preserve data:
This preserves: ~/.tsi/db/, ~/.tsi/install/, ~/.tsi/packages/, ~/.tsi/sources/, ~/.tsi/build/
Complete Uninstall
Remove everything including all TSI data:
Warning: This will remove all packages installed via TSI!
Custom Prefix Uninstall
Uninstall from a custom installation location:
After Uninstalling
After uninstalling, you should also:
-
Remove from PATH: Edit your shell profile (
~/.bashrc,~/.zshrc, etc.) and remove: -
Remove completion: Remove completion script sources:
-
Reload shell: Restart your terminal or run:
Reinstalling After Uninstall
After uninstalling, you can reinstall TSI:
# Reinstall
curl -fsSL https://raw.githubusercontent.com/PanterSoft/tsi/main/tsi-bootstrap.sh | sh
# If you used --all, you'll need to:
# 1. Reinstall TSI
# 2. Update package repository: tsi update
# 3. Reinstall packages: tsi install <package>
Troubleshooting
Repair Fails
Problem: Repair mode fails to build
Solutions:
- Check internet connection (for downloading pre-built binary)
- If building from source: ensure Rust toolchain is installed (rustc --version)
- Try manual build: cargo build --release
Uninstall Fails
Problem: Permission errors when removing files
Solutions:
- Check file permissions: ls -la ~/.tsi/bin/tsi
- Use sudo if installed system-wide: sudo rm -rf /opt/tsi
Binary Still in PATH
Problem: After uninstall, tsi command still works
Solutions:
- Check PATH: which tsi
- May be installed in multiple locations
- Check system-wide installation: ls -la /usr/local/bin/tsi
- Remove from shell profile
Best Practices
- Regular Updates: Use
--repairperiodically to keep TSI updated - Backup Before Uninstall: If using
--all, backup important packages - Test After Repair: Run
tsi --versionto verify repair worked - Clean Uninstall: Use
--allonly when you're sure you want to remove everything