Bootstrap Reset #
Reset your bootstrap configuration by removing installed components.
Usage #
allbctl bootstrap reset
What It Does #
Removes bootstrap components in reverse order of installation:
- Shell Config Tools - (tracking only, not removed)
- Dotfiles - (manual removal recommended)
- SSH Configuration - (manual removal recommended)
- Required Tools - (manual removal recommended)
- Expected Directories - (manual removal recommended)
Important Notes #
Manual Removal Recommended #
For safety, most components show instructions for manual removal rather than auto-removing:
❌ Cannot auto-uninstall SSH key registration - please remove manually from GitHub
❌ Cannot auto-uninstall dotfiles - please remove manually
This prevents accidental data loss.
What Gets Auto-Removed #
Currently, reset is primarily for testing and shows status but requires manual cleanup.
Example Output #
$ allbctl bootstrap reset
System Info
-----
OS: ubuntu 22.04
Hostname: workstation
Uninstalling: Shell Config Tools
❌ Cannot auto-uninstall shell config tracking
Uninstalling: Dotfiles
❌ Cannot auto-uninstall dotfiles from ~/src/dotfiles - please remove manually
Uninstalling: SSH Configuration
❌ Cannot auto-uninstall SSH key registration - please remove manually from GitHub
Uninstalling: Required Tools
❌ Cannot auto-uninstall gh - please remove manually
❌ Cannot auto-uninstall git - please remove manually
Uninstalling: Expected Directories
❌ Cannot auto-uninstall ~/src - please remove manually
Manual Cleanup #
Remove Dotfiles #
rm -rf ~/src/dotfiles
Remove SSH Keys #
Remove from GitHub:
- Visit https://github.com/settings/keys
- Delete the key for this machine
Remove local key:
rm ~/.ssh/id_rsa ~/.ssh/id_rsa.pub
Remove Tools #
Linux (apt):
sudo apt remove gh git
Linux (dnf):
sudo dnf remove gh git
macOS (brew):
brew uninstall gh git
Windows (winget):
winget uninstall GitHub.cli
winget uninstall Git.Git
Remove Directories #
# Only if empty or you're sure
rm -rf ~/src
Why Manual Removal? #
Bootstrap reset doesn’t auto-remove components because:
- Data Safety - Prevents accidental deletion of code in ~/src
- SSH Keys - Removing from GitHub requires API access
- System Tools - git/gh might be used by other applications
- Dotfiles - May contain important customizations
Testing Workflow #
For testing bootstrap in a clean environment:
# Install
allbctl bootstrap install
# Check status
allbctl bootstrap status
# Reset (shows what to remove)
allbctl bootstrap reset
# Manual cleanup
rm -rf ~/src/dotfiles
# ... other manual steps
# Verify clean state
allbctl bootstrap status
Use Cases #
Testing Bootstrap #
Test installation in a VM:
# Install
allbctl bootstrap install
# Test
allbctl bootstrap status
# Clean up for next test
allbctl bootstrap reset
# Then manually remove components
Troubleshooting Installation #
If installation goes wrong:
# Reset to see what was installed
allbctl bootstrap reset
# Manually clean up problem components
# Then try again
allbctl bootstrap install
Moving to Clean Slate #
Before switching dotfiles repositories or major changes:
allbctl bootstrap reset
# Manually remove old setup
# Configure new setup
allbctl bootstrap install
Future Enhancement #
A future version might include:
--forceflag for actual removal- Selective component removal
- Backup before removal
- More automated cleanup
Alternatives #
Instead of reset, you can:
Selectively Remove Components #
# Just remove dotfiles
rm -rf ~/src/dotfiles
# Just uninstall gh
sudo apt remove gh # or brew uninstall gh
Fresh OS Install #
For complete clean slate:
- Reinstall operating system
- Or use a new VM/container
Check and Reinstall #
# Check what's there
allbctl bootstrap status
# Reinstall over existing (idempotent)
allbctl bootstrap install
Related Commands #
- Bootstrap Status - Check current state
- Bootstrap Install - Install components