Remove Command
Completely uninstall NexoralDNS from your system. This command removes all services, data, configurations, and restores your original system settings.
Critical Warning:
This action is IRREVERSIBLE! The remove command will permanently delete all DNS records, custom configurations, query logs, cache data, and user settings. Make sure to backup any important data before proceeding.
Command
curl -fsSL https://raw.githubusercontent.com/nexoral/NexoralDNS/main/Scripts/install.sh | bash -s removeWhat It Does
The remove command performs a complete uninstallation of NexoralDNS from your system. It executes the following operations:
Removal Process:
- Prompts for confirmation before proceeding
- Stops all running NexoralDNS containers
- Removes all NexoralDNS Docker containers
- Deletes all NexoralDNS Docker images
- Removes all Docker volumes (containing all data)
- Deletes NexoralDNS Docker networks
- Removes NexoralDNS installation directory
- Restores original DNS configuration
- Cleans up system configuration files
- Removes scheduled tasks and cron jobs (if any)
What Gets Removed
All Services
Every NexoralDNS service is permanently removed:
- DNS Server: Complete removal including all DNS configurations
- Cache Manager: All cache data and configurations deleted
- Web Dashboard: Dashboard application and all user data removed
- Database: All stored data including query logs permanently deleted
All Data
The following data is permanently deleted:
- Custom DNS records and domain mappings
- Block lists and filtering rules
- Query logs and analytics history
- Cache statistics and performance data
- User accounts and authentication credentials
- Dashboard settings and preferences
- API keys and integration tokens
- Backup files (if stored in installation directory)
System Configuration
System settings are restored to pre-installation state:
- DNS configuration in
/etc/resolv.confrestored to original - Port 53 and 4000 released and available for other services
- System firewall rules related to NexoralDNS removed
- Systemd services (if any) unregistered and removed
What Is NOT Removed
The following are intentionally preserved:
- Docker: Docker and Docker Compose remain installed
- Dependencies: System packages installed as dependencies
- Router Settings: You must manually change router DNS settings
- External Backups: Backups stored outside the installation directory
Confirmation Process
To prevent accidental deletion, the remove command requires explicit confirmation:
WARNING: This will permanently remove NexoralDNS and ALL data!
This action will delete:
âĸ All DNS records and configurations
âĸ Query logs and analytics data
âĸ User accounts and settings
âĸ Cache data and statistics
This action is IRREVERSIBLE!
Type 'yes' to confirm removal, or anything else to cancel: You must type yes (case-sensitive) and press Enter to proceed. Any other input will cancel the operation.
Expected Output
After confirmation, a successful removal will display:
Confirmation received. Proceeding with removal...
[â] Stopping all services...
Stopping nexoraldns-dashboard ... done
Stopping nexoraldns-cache ... done
Stopping nexoraldns-dns-server ... done
[â] Removing containers...
Removing nexoraldns-dashboard ... done
Removing nexoraldns-cache ... done
Removing nexoraldns-dns-server ... done
[â] Removing images...
Deleted: nexoral/dns-server:latest
Deleted: nexoral/cache-manager:latest
Deleted: nexoral/dashboard:latest
[â] Removing volumes...
Deleted: nexoraldns_dns-data
Deleted: nexoraldns_cache-data
Deleted: nexoraldns_db-data
[â] Removing networks...
Deleted: nexoraldns_default
[â] Removing installation directory...
[â] Restoring original DNS configuration...
[â] Cleaning up system files...
NexoralDNS has been completely removed from your system.
Original DNS configuration restored.
All data has been permanently deleted.
Thank you for using NexoralDNS!Pre-Removal Backup
If you want to preserve your data before removal, create a manual backup:
Backup Custom DNS Records
# Export DNS records from dashboard\n# Go to: Settings â Export Data â Download DNS Records\n\n# Or manually backup configuration\nsudo cp -r /var/lib/nexoraldns/dns-config ~/nexoraldns-backup/Backup Query Logs
# Export query logs from dashboard\n# Go to: Analytics â Export Logs â Download\n\n# Or backup database volume\nsudo docker run --rm -v nexoraldns_db-data:/data -v ~/nexoraldns-backup:/backup \\\n alpine tar czf /backup/db-backup-$(date +%Y%m%d).tar.gz -C /data .Backup User Settings
# Export all settings from dashboard\n# Go to: Settings â Export All â Download ConfigurationBackup Recommendation:
Even if you plan to reinstall NexoralDNS later, backing up your custom configurations can save significant time. DNS records, block lists, and custom rules can be time-consuming to recreate.
Manual Removal Process
If you prefer to remove components manually or the automated script fails:
Step 1: Stop and Remove Containers
cd /path/to/NexoralDNS/Scripts\nsudo docker compose down -vStep 2: Remove Images
sudo docker rmi $(sudo docker images 'nexoral/*' -q)Step 3: Remove Installation Directory
sudo rm -rf /path/to/NexoralDNSStep 4: Restore DNS Configuration
sudo nano /etc/resolv.conf\n# Remove or replace NexoralDNS nameserver entriesStep 5: Clean Docker System (Optional)
# Remove unused Docker resources\nsudo docker system prune -a --volumesPost-Removal Steps
Update Router DNS Settings
After removing NexoralDNS, you must manually update your router's DNS configuration:
- Access your router's admin panel
- Navigate to DNS or DHCP settings
- Remove your machine's IP from DNS server settings
- Set DNS to your ISP's servers or public DNS (e.g., 8.8.8.8, 1.1.1.1)
- Save settings and restart router if needed
Release Static IP Reservation
If you reserved a static IP for the NexoralDNS machine:
- Access router admin panel
- Go to DHCP reservation settings
- Remove the reservation for your machine
- Save changes
Verify Complete Removal
Confirm all components are removed:
# Check for containers\nsudo docker ps -a | grep nexoral\n\n# Check for images\nsudo docker images | grep nexoral\n\n# Check for volumes\nsudo docker volume ls | grep nexoral\n\n# Check DNS configuration\ncat /etc/resolv.confAll commands should return no results.
Troubleshooting Removal
Removal Script Fails
Problem: Automated removal script encounters errors.
Solution: Use manual removal process outlined above.
Containers Won't Stop
Force kill containers:
sudo docker kill $(sudo docker ps -q --filter 'name=nexoraldns')Volumes Won't Delete
Force remove volumes:
sudo docker volume rm $(sudo docker volume ls -q | grep nexoraldns) --forcePermission Denied Errors
Ensure running with sudo:
sudo curl -fsSL https://raw.githubusercontent.com/nexoral/NexoralDNS/main/Scripts/install.sh | sudo bash -s removeLast Resort:
If you cannot remove NexoralDNS through normal means, you can forcefully delete all Docker resources: sudo docker system prune -af --volumes. WARNING: This removes ALL Docker containers, images, and volumes on your system, not just NexoralDNS!
Reinstalling After Removal
If you want to reinstall NexoralDNS after removal:
curl -fsSL https://raw.githubusercontent.com/nexoral/NexoralDNS/main/Scripts/install.sh | bash -This will perform a fresh installation. To restore from backup:
# After fresh installation, restore DNS records through dashboard\n# Go to: Settings â Import â Upload Backup File\n\n# Or manually restore configuration\nsudo cp -r ~/nexoraldns-backup/* /var/lib/nexoraldns/dns-config/\nsudo docker compose restartAlternatives to Complete Removal
Before removing NexoralDNS completely, consider these alternatives:
Stop Services Instead
If you want to temporarily disable NexoralDNS without losing data:
curl -fsSL https://raw.githubusercontent.com/nexoral/NexoralDNS/main/Scripts/install.sh | bash -s stopSee the stop command documentation for details.
Reset to Default Configuration
To keep NexoralDNS but reset all settings:
# This preserves installation but resets data\nsudo docker compose down -v\nsudo docker compose up -dFeedback
If you're removing NexoralDNS, we'd love to hear why:
- Open an issue on GitHub with feedback
- Share your experience to help us improve
- Let us know what features you'd like to see
Related Commands
- Install Command - Reinstall NexoralDNS
- Stop Command - Alternative to removal
- Installation Guide - Complete installation documentation
- Troubleshooting - Common issues and solutions