uninstall
The uninstall command performs a complete removal of NextDNS Blocker, including scheduled jobs, configuration files, and all data.
nextdns-blocker uninstall [OPTIONS]Options
Section titled “Options”| Option | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
--help | Show help message |
What It Removes
Section titled “What It Removes”1. Scheduled Jobs
Section titled “1. Scheduled Jobs”Removes all automatic sync jobs:
- macOS: Unloads and deletes launchd plist files
- Linux: Removes cron entries
- Windows: Deletes Task Scheduler tasks
2. Configuration Directory
Section titled “2. Configuration Directory”Deletes the entire config directory containing:
.envfile (API credentials)config.json(domain configuration)- Any backup files
Default locations:
- macOS/Linux:
~/.config/nextdns-blocker/ - Windows:
%APPDATA%\nextdns-blocker\
3. Data Directory
Section titled “3. Data Directory”Deletes the data directory containing:
- Audit logs
- Cache files
- Pending actions state
Default locations:
- macOS/Linux:
~/.local/share/nextdns-blocker/ - Windows:
%LOCALAPPDATA%\nextdns-blocker\
Example
Section titled “Example”Interactive Uninstall
Section titled “Interactive Uninstall”nextdns-blocker uninstallOutput:
NextDNS Blocker Uninstall -------------------------
This will permanently delete: • Scheduled jobs (watchdog) • Config: /Users/you/.config/nextdns-blocker • Data: /Users/you/.local/share/nextdns-blocker
Are you sure you want to continue? [y/N]: y
Removing... [1/3] Removing scheduled jobs... Done [2/3] Removing config directory... Done [3/3] Removing data directory... Done
Uninstall complete! To remove the package itself, run: brew uninstall nextdns-blocker (Homebrew) pipx uninstall nextdns-blocker (pipx) pip uninstall nextdns-blocker (pip)Silent Uninstall
Section titled “Silent Uninstall”Skip the confirmation prompt:
nextdns-blocker uninstall --yesComplete Removal
Section titled “Complete Removal”After running uninstall, remove the package itself:
Homebrew
Section titled “Homebrew”brew uninstall nextdns-blockerpipx uninstall nextdns-blockerpip uninstall nextdns-blockerWhat Remains After Uninstall
Section titled “What Remains After Uninstall”The uninstall command removes all NextDNS Blocker data, but:
- NextDNS account unchanged - Your NextDNS profile and denylist remain
- Domains still blocked - Manually added domains stay in NextDNS
- Package still installed - You need to remove it separately
To Clear NextDNS Denylist
Section titled “To Clear NextDNS Denylist”Before uninstalling, you can clear all blocked domains:
# Edit config to empty blocklistnextdns-blocker config edit# Remove all entries from blocklist
# Run sync to remove from NextDNSnextdns-blocker config push
# Then uninstallnextdns-blocker uninstallOr manually clear via NextDNS Dashboard.
Reinstalling
Section titled “Reinstalling”To reinstall after uninstalling:
# Reinstall packagebrew install nextdns-blocker # or pipx/pip
# Run setup wizardnextdns-blocker initYou’ll need to reconfigure everything from scratch.
Backup Before Uninstall
Section titled “Backup Before Uninstall”To save your configuration before uninstalling:
# Backup configcp ~/.config/nextdns-blocker/config.json ~/nextdns-backup.jsoncp ~/.config/nextdns-blocker/.env ~/nextdns-backup.env
# Uninstallnextdns-blocker uninstallScripting
Section titled “Scripting”For automated deployments:
#!/bin/bash# Complete removal scriptnextdns-blocker uninstall --yespip uninstall nextdns-blocker --yesecho "NextDNS Blocker completely removed"Troubleshooting
Section titled “Troubleshooting”Permission denied
Section titled “Permission denied”[2/3] Removing config directory... Error: Permission deniedSolution: Check file ownership or run with appropriate permissions.
Scheduled jobs warning
Section titled “Scheduled jobs warning”[1/3] Removing scheduled jobs... Warning: Job not foundThis is normal if the watchdog was never installed or was already removed.
Cannot uninstall during panic mode
Section titled “Cannot uninstall during panic mode”If panic mode is active, the uninstall command still works. Panic mode state is stored locally and will be removed along with other data.
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Uninstall successful (or cancelled) |
| 1 | Error during removal (partial uninstall) |
Related Commands
Section titled “Related Commands”| Command | Description |
|---|---|
watchdog uninstall | Remove only scheduled jobs |
init | Set up fresh installation |
fix | Repair without removing |