October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Wipe a Linux VPS and Start Fresh (Safely)

A safe VPS reset uses the hosting provider’s rebuild or destroy workflow—not rm -rf. Back up and verify data, record provider resources, reinstall a clean image, rotate secrets, harden SSH and validate services before changing DNS.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safe way to wipe a Linux VPS is to use your hosting provider’s Rebuild or Reinstall function, or delete the instance and provision a new one. Do not try to erase a running server with rm -rf: the operating system is using files, mounts, services and permissions that make a self-wipe incomplete and potentially unrecoverable. Export and verify your backups first, record every provider-side dependency, choose between rebuilding and destroying the instance, then harden the fresh system before restoring applications.

What “wiping a VPS” actually means

A VPS has two layers that matter during a reset:

  • The instance and its operating-system disk. This contains Linux, packages, users, configuration files, application code and local data.
  • Provider-managed resources outside that disk. These can include snapshots, backups, attached volumes, reserved or floating IP addresses, firewalls, load balancers and DNS records.

A provider rebuild normally replaces the operating-system disk with a selected image while retaining the server resource. DigitalOcean defines rebuilding a Droplet as wiping its disk and replacing it with an image you select. Its documentation lists retaining the existing public IP as one reason to rebuild. A destroy operation is different: deleting a Droplet permanently and irreversibly destroys that Droplet.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Destroying an instance does not necessarily remove every related resource. DigitalOcean instructs customers to review snapshots, volumes, backups and IP resources in the confirmation screen. Treat each item as a separate decision, not as an automatic part of “wipe.”

Before you press Rebuild or Delete

Assume that anything left only on the current disk will disappear. Complete this inventory while the old system is still available, and store the exports somewhere independent of the VPS.

#1 Best Overall
Sandisk 2TB Extreme Portable SSD, Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware, External Solid State Drive, SDSSDE61-2T00-G25
  • Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
  • Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
  • Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
  • Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
  • Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C

Export the data you actually need

  • Application source, uploaded assets and user-generated files.
  • Database dumps, including the version and connection details needed for a restore.
  • Environment files, service configuration and deployment manifests, with secrets stored securely rather than pasted into notes.
  • SSH public and private keys, host fingerprints and the list of people or systems allowed to connect.
  • TLS certificates and renewal configuration.
  • Cron jobs, systemd unit files, timers and other scheduled tasks.
  • Firewall rules, reverse-proxy settings, virtual-host definitions and DNS records.

Back up provider-side volumes, snapshots and other resources separately. A database export on an attached volume is not protected if that volume is selected for deletion.

Prove that the backup can be restored

Check that every archive opens, every database dump can be read and the files are complete. Perform a trial restore on a temporary system when the data is important. A backup that has never been restored is an assumption, not a recovery plan. Record the backup location, encryption key, database credentials and restore order before starting the wipe.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Record provider dependencies

Write down the server name and ID, region, plan, operating-system image and version, public and floating IP addresses, attached volumes, snapshots, backups, firewall objects, load balancers and DNS TTL values. Note whether clients, allowlists or certificates depend on the current public IP. If you destroy and recreate the instance, expect the replacement to be a different provider resource even if you later point the same domain at it.

Rebuild or destroy and recreate?

Choice What changes When it fits Important caution
Rebuild/reinstall The provider replaces the instance disk with a selected OS image. You want a clean operating system while retaining the server resource; on DigitalOcean, retaining the existing IP is a documented reason. Anything on the disk is lost. Review attached resources and confirm the image and region before starting.
Destroy and recreate The existing instance is permanently deleted and a new resource is provisioned. You want a wholly new resource or the provider recommends a fresh server so settings are new and current. Deletion is irreversible. Public IP, resource ID and instance-level settings may change.

Hetzner’s FAQ recommends deleting a server completely and creating a new one for reinstallation because this ensures that all settings are new and up to date. Its rebuild option is still available when you want to replace the operating system without taking that route. If an incident may have exposed credentials or configuration, a new resource can make it easier to ensure that old settings are not carried forward; in either case, rotate secrets before reconnecting production services.

Rank #2
Sandisk 1TB Portable SSD, Up to 800MB/s Read Speeds, Black (Old Model) | External Solid State Drive, Compatible with Laptops & Tablets, Up to 2M Drop Protection, USB 3.2 Gen 2, USB-C to USB-A Cable
  • Solid state performance with up to 800MB/s read speeds in a portable drive. (Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
  • Back up your content and memories on a storage solution that fits seamlessly into your mobile lifestyle.
  • Take it with you on your adventures—up to two-meter drop protection means this durable drive can take a beating. (Based on internal testing.)
  • Secure it to your belt loop or backpack for extra peace of mind thanks to the tough rubber hook.
  • From Sandisk, a brand professional photographers trust to take on assignments.

How to rebuild a cloud VPS

DigitalOcean Droplets

  1. Open the Droplet in the control panel and choose the documented Rebuild action.
  2. Select the Linux image and version you want to install. Check the region, architecture and release before confirming.
  3. Read the confirmation screen. Verify which disk will be wiped and whether any attached volumes, snapshots, backups or IP resources are being retained.
  4. Start the rebuild and wait for the provider to report completion. The old operating-system disk is no longer a source for files or credentials.
  5. Reconnect using the new image’s access method, then perform the hardening and restoration steps below.

DigitalOcean also documents destroy controls in its control panel, command-line tool and API. Use those documented controls rather than attempting to erase the live filesystem. A destroy request permanently and irreversibly deletes the Droplet, so capture any final exports first.

Hetzner Cloud servers

  1. Select the server in the Hetzner Cloud interface and choose Rebuild.
  2. Choose the desired operating-system image and confirm that the selected server, region and disk are correct.
  3. Review the confirmation details for data loss and for resources that are not part of the server disk.
  4. Wait for the rebuild to finish, then connect with the new system’s credentials or SSH key.

For a completely new cloud server, delete the existing server and create another one, following Hetzner’s recommendation when you need all settings to be new. The FAQ explicitly warns that all saved data will be lost.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reinstalling a dedicated Linux server when SSH is unavailable

If the machine is a dedicated server rather than a cloud VPS, the provider may expose a separate installation path. Hetzner documents two options:

  • Use the Linux tab in Robot to select and install an operating system.
  • Boot the machine into the Rescue System, connect to it, and run the provider’s installimage tool.

Rescue access is useful when the installed system will not boot or SSH is unavailable. It does not preserve data automatically: select disks and partitions carefully, and ensure that your exports are stored away from the machine before running the installer.

Rank #3
Sale
PNY CS900 250GB 2.5" SATA III Internal SSD | Up to 535/500MB/s R/W - PC/Laptop/HDD Upgrade for Everyday Users, Creators, Gamers, and more - SSD7CS900-250-RB
  • Upgrade your laptop or desktop computer and feel the difference with super-fast OS boot times and application loads
  • Exceptional performance offering up to 535MB/s seq. Read and 500MB/s seq. Write speeds
  • Superior performance as compared to traditional hard drives (HDD)
  • Ultra-low power consumption
  • Backwards compatible with SATA II 3GB/sec

What to do after the fresh image boots

A new image is not a finished production server. Complete these actions before restoring public-facing applications.

1. Establish a controlled administrative login

Connect over SSH using the access method supplied by the provider. Create a normal administrative user, grant it the required sudo privileges, and install an SSH public key for that account. Keep a tested recovery path available until the new account has successfully logged in and elevated privileges.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Update the base system

Apply the distribution’s current package updates and reboot when the system requires it. Confirm the running kernel and that critical services start after reboot. Do not restore application files before the base system is in a known, updated state.

3. Reduce exposed access

Configure a host firewall that allows only the ports your services need. Disable unnecessary services and avoid leaving password or root SSH exposure enabled when your provider’s guidance and your recovery plan support key-based administration. Test the firewall from a second session so you do not lock yourself out.

Rank #4
SSK Portable SSD 500GB External Solid State Hard Drive USB C Up to 1050MB/s
  • Capacity Display Variance: 500GB external ssd often appears as around 465GB on Windows. MacOS can show full 500 GB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
  • 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
  • Data Security: Solid state drives S.M.A.R.T. health diagnostics​ and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
  • USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
  • Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity

4. Enable operational safeguards

Turn on provider backups or snapshots as appropriate, configure monitoring, and set alerts for disk space, memory, failed services and authentication activity. Document the new server ID, addresses, image version and recovery procedure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Restore applications without bringing the old compromise back

  1. Install only the packages and services required by the application.
  2. Restore the database from the verified dump, then restore application files and uploads.
  3. Recreate users, permissions, service accounts, scheduled jobs and reverse-proxy configuration from documented values rather than copying an entire old system directory.
  4. Install a new SSH key set if compromise was possible, and rotate database passwords, API tokens, deployment credentials, TLS private keys and other secrets that were present on the old server.
  5. Apply the intended firewall rules and verify that the application binds only to the required interfaces and ports.

If the reset follows a suspected hack, do not treat old credentials, shell histories or configuration archives as trustworthy. Restore data selectively from clean sources and rotate credentials before allowing automated deployments or third-party integrations to reconnect.

Validate the replacement before changing DNS

Local checks

  • Confirm the operating-system release, hostname, time zone and disk layout.
  • Check that databases, web servers, queues, workers and scheduled jobs are running.
  • Review service logs for startup failures, permission errors and repeated authentication attempts.
  • Verify that backups complete and that monitoring reports the expected server identity.

External checks

  • Test the public application over HTTP or HTTPS, including redirects and certificate validity.
  • Test administrative access from a separate network and confirm that forbidden ports are blocked.
  • Exercise important user flows, background jobs, file uploads, email delivery and database writes.
  • Check DNS records, load-balancer membership and any allowlists that reference the old address.

Only after these checks pass should you lower or update DNS records. Keep the old DNS TTL in mind: resolvers may continue using cached answers until the previous TTL expires. Monitor the replacement while traffic moves, and keep the verified backup until the new system has completed a successful backup and restore cycle.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Provider differences that affect your plan

Planning question DigitalOcean documentation Hetzner documentation
Is a disk replacement available? Yes. Rebuild wipes the Droplet disk and installs a selected image. Yes. Cloud servers have a Rebuild path; dedicated servers can use Robot or Rescue with installimage.
Can you retain the existing instance and IP? Retaining the Droplet and its public IP is listed as a reason to rebuild. IP-retention behavior for a rebuild is not stated in the supplied provider material; confirm it in the current console before proceeding.
What does destruction do? Deleting a Droplet permanently and irreversibly destroys it. The FAQ warns that all saved data will be lost and recommends delete-and-create for a fully fresh setup.
Are volumes, backups and snapshots removed automatically? Not every associated resource is removed unless you select it; review the confirmation screen. Automatic treatment of each external resource is not stated; inspect the deletion dialog and resource list.
Are automation controls documented? Control-panel, doctl and API controls are documented for destroy operations. Cloud rebuild and dedicated-server Rescue/Robot procedures are documented; exact automation coverage depends on the product.

Provider interfaces change. The DigitalOcean rebuild documentation was verified on 25 August 2026, its destroy documentation on 13 July 2026, and its quickstart on 3 September 2026. Recheck the current confirmation screen and provider instructions immediately before an irreversible action.

Best Value
Sale
Samsung T7 Portable SSD 1TB Titan Gray, USB 3.2 Gen 2, Up to 1,050MB/s | Reliable External Solid State Drive Storage for Gaming, Students, Professionals (MU-PC1T0T/AM)
  • MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
  • SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
  • ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
  • ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
  • HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³

Common mistakes and how to avoid them

Running a recursive delete on the live system

A command such as rm -rf cannot reliably remove a running operating system and does not address provider-side volumes, snapshots, IP resources or backups. Use the provider’s rebuild or destroy workflow instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deleting first and backing up later

Deletion cannot be undone. Export databases, files, keys and configuration before opening the destructive confirmation screen, and verify that the exports are readable.

Assuming a snapshot is the same as a clean rebuild

A snapshot preserves the old disk state. It is useful for recovery only when you intentionally want that state; it does not create a clean operating system and may preserve compromised files or credentials.

Forgetting resources outside the disk

Detached volumes, reserved addresses, load balancers, firewalls and DNS records can remain after an instance is destroyed. Review each resource so you neither delete something needed for recovery nor leave an unwanted resource attached.

Restoring secrets unchanged

If the old server may have been compromised, old SSH keys, API tokens, passwords and certificates may no longer be trustworthy. Rotate them before production traffic and automated jobs return.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Locking yourself out during hardening

Create and test the sudo-capable account and key-based login in a second session before disabling other access methods. Keep provider console or Rescue access available until remote administration is confirmed.

A practical reset checklist

  • Export databases, application files, secrets, keys, certificates, cron jobs, firewall rules and DNS details.
  • Verify that backups can be opened and restored.
  • Record server ID, region, plan, image, IPs, volumes, snapshots, backups and dependent services.
  • Decide whether retaining the existing resource or IP requires a rebuild.
  • Choose destroy-and-recreate when you need a wholly new resource or the provider recommends it for a clean settings baseline.
  • Review every external resource in the provider confirmation screen.
  • Run the documented rebuild, reinstall, destroy, Robot or Rescue procedure.
  • Create a normal sudo user, install an SSH key, update packages and configure the firewall.
  • Enable backups and monitoring before restoring production data.
  • Restore selectively from clean backups, rotate credentials and validate services locally and externally.
  • Update DNS only after tests pass, then monitor the replacement during the transition.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.