The safe way to wipe a Linux VPS is to use your hosting provider’s Rebuild or Reinstall control, or to destroy the instance and provision a new one. Do not try to clean a running server with rm -rf: the live operating system, mounted volumes, boot files, permissions and provider metadata make that approach incomplete and potentially destructive.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Before clicking anything, prove that your backups restore, record every dependency, and decide whether the current public IP must survive. Rebuild normally replaces the system disk while retaining the server resource; destroy-and-recreate gives you a wholly new resource but is permanent and can change addresses, attached resources and settings.
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsWhat “wipe a VPS” actually means
A virtual private server has more than a directory tree. The provider controls the virtual machine, disk image, network identity, snapshots, backups, firewalls, floating or reserved IPs, attached volumes and console access. A wipe must therefore replace or remove the provider-managed server, not merely delete files from a shell session.
DigitalOcean describes a rebuild as wiping a Droplet’s disk and replacing it with an image you select. Its destroy operation permanently and irreversibly destroys the Droplet. Hetzner documents a Rebuild action and also recommends deleting a server completely and creating a new one when a clean, up-to-date configuration is required. Those operations are materially different from deleting application files inside the existing installation.
#1 Best Overall
- 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
A rebuild is usually the right choice when you want to retain the instance identity or public IP and your provider supports an image replacement. Destroy and recreate is better when you want a completely new resource, a different region or plan, or maximum certainty that old instance-level settings are gone. In either case, data outside the system disk may survive unless you explicitly remove it.
Rebuild or destroy and recreate?
| Decision factor | Rebuild or reinstall | Destroy and create a new VPS |
|---|---|---|
| What happens | The provider replaces the server disk with a selected operating-system image. | The existing instance is permanently deleted, then a new instance is provisioned. |
| Public IP | Often retained, depending on the provider and operation; this is a key reason to choose rebuild. | Usually changes unless you separately retain and reassign a floating, reserved or similar address. |
| Instance identity | Server ID, billing object and some network settings can remain. | A new resource receives new identifiers and default settings. |
| Attached volumes, snapshots and backups | May remain attached or available; inspect the provider’s behavior. | Not necessarily deleted automatically. Review each resource in the confirmation screen. |
| Best use | Fast reset while preserving the resource or address. | A clean break after compromise or when all instance settings should be recreated. |
| Risk | The selected disk is overwritten; anything on it is lost. | Deletion is irreversible and all data on the instance is lost. |
DigitalOcean’s rebuild documentation was verified on 25 August 2026, its destroy documentation on 13 July 2026, and its quickstart on 3 September 2026. Hetzner’s guidance distinguishes Cloud Rebuild from delete-and-create and documents a Rescue System path for dedicated servers. Provider labels and available images can change, so read the confirmation screen for the exact resource you are about to overwrite.
Free tools Windows power users keep installed
One-click scans. No signup required.
Before wiping: make a restorable inventory
Assume the VPS will be unrecoverable the moment the provider operation starts. Inventory what you need to reproduce the service, then make an independent backup. A snapshot alone is not a substitute for an export you have tested on another machine.
Export application and system data
- Export every database with its users, permissions, extensions and scheduled jobs. Keep a copy outside the VPS.
- Copy application source, uploaded files, persistent storage directories and deployment configuration.
- Save environment variables and secret references, but plan to rotate credentials if compromise is possible.
- Export TLS certificates and document how they are renewed. Do not rely on a private key that exists only on the old disk.
- Record cron entries, systemd timers, queue workers and other scheduled jobs.
- Save firewall rules, reverse-proxy configuration, service ports and any allowlists.
- Preserve SSH public keys and the administrator access procedure. Keep private keys in a secure location, never in a public backup.
Verify that backups work
Open the backup from a separate system and check that the archive is readable. Restore a database into a temporary database service, unpack application files, and confirm that required owners and permissions can be recreated. Check timestamps and file counts for large upload directories. A backup that has never been restored is only an assumption.
If you use provider snapshots or backups, note their retention and whether they are attached to the server. DigitalOcean warns that destruction is irreversible and recommends converting backups to snapshots when they must be kept. Treat that as a preservation step, not proof that the snapshot contains every external volume or configuration object.
Record provider and DNS dependencies
Create a short change record before the wipe. It prevents the common failure where the new machine is healthy but an overlooked dependency still points at the old one.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #2
- 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.
- Server name, server ID, region, plan and operating-system image/version.
- Public IPv4 and IPv6 addresses, plus any floating or reserved IP.
- Attached block volumes, snapshots, automated backups and their retention dates.
- Provider firewalls, security groups, load balancers, private networks and health checks.
- DNS A, AAAA, CNAME, MX and TXT records, including the current TTL values.
- External services that allowlist the old address: databases, APIs, payment systems, mail relays, monitoring and source-control deploy keys.
- Certificates, domain names, webhook endpoints and callback URLs.
- Whether the current public IP must remain unchanged for customers or allowlists.
Lower DNS TTL before a planned migration only if you control the zone and have enough time for caches to expire. A low TTL does not instantly replace already cached records. If preserving the old address is essential, choose a rebuild or retain the provider’s movable address resource rather than assuming a new VPS will receive the same address.
Choose the reset path
- Use Rebuild when the provider offers it, you want to keep the server resource or public IP, and replacing the system disk is sufficient.
- Use destroy and recreate when you want new instance settings, a different size or region, or a clean resource after a suspected compromise.
- Preserve external resources deliberately. Detach or retain volumes, snapshots, backups and IP resources according to your recovery plan; do not select a blanket deletion option without reading what it includes.
- Use console or Rescue access when SSH is unavailable. A control-panel console can let you start the provider operation without relying on the old operating system.
For a hacked server, do not treat a rebuild as evidence that every secret is safe. An attacker may have copied database passwords, API tokens, SSH keys or certificates before the disk was replaced. Rotate them during restoration and inspect external systems for unauthorized access.
DigitalOcean: rebuild a Droplet
Rebuild while retaining the Droplet
In the DigitalOcean control panel, open the Droplet, choose the rebuild action, select the desired image and review the warning. The documented operation wipes the Droplet disk and replaces it with the chosen image. Confirm the correct Droplet name, image, region and any IP requirement before proceeding.
After the operation completes, the old filesystem is no longer the source of the boot environment. You must perform first-login setup again, including user accounts, SSH authorization, firewall rules, software packages and application deployment. A retained IP does not mean retained application state.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteDestroy and provision a new Droplet
Use the Droplet’s destroy control only after exporting data and deciding which related resources must remain. DigitalOcean states that deleting a Droplet permanently and irreversibly destroys it. The confirmation screen can include choices concerning snapshots, volumes, backups and IP resources; inspect each item rather than assuming all associated objects disappear.
DigitalOcean documents control-panel, doctl and API paths for destruction. Automation is useful for repeatable infrastructure, but verify the server ID and deletion parameters in a non-production context first. Keep the command or request in your change record so another administrator can understand exactly what was removed.
Rank #3
- 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
Hetzner: Cloud and dedicated-server options
Hetzner Cloud Rebuild
For a Hetzner Cloud server, select Rebuild and choose the operating-system image you want to restore. The operation replaces the server’s installed system, so all data on the old installation is lost. Confirm the server, image and any attached storage before accepting the warning.
Hetzner also recommends deleting the server completely and creating a new one when the goal is to ensure that settings are new and up to date. That route gives you a new resource rather than a reset disk. Preserve volumes, snapshots, backups and movable IP resources explicitly if you need them after the old server is deleted.
Hetzner dedicated servers
For a dedicated server, Hetzner documents reinstalling from Robot’s Linux tab or booting the Rescue System and running installimage. Rescue mode is valuable when the installed system will not boot or SSH is unavailable. Select the intended distribution and storage layout carefully: the installer can overwrite the target disks, and Hetzner’s warning is explicit that all saved data will be lost.
Use the provider’s console or Rescue access to verify that you are operating on the intended machine. If the server contains separate data disks, identify them before installation and decide whether they should be preserved, reformatted or restored from backup.
First login after the fresh image
A new image is an empty starting point, not a production-ready service. Complete the following sequence from a trusted workstation or provider console.
- Connect with the provider-supplied method. Use the new server address and the SSH key or temporary credentials selected during provisioning. If SSH fails, use the provider console or Rescue environment rather than weakening security to make the old setup work.
- Update package metadata and installed packages. Apply the distribution’s current security updates before exposing application ports. Reboot if the package manager or kernel requires it.
- Create a normal administrative account. Add a named user, grant the minimum required
sudoprivileges, and install that user’s SSH public key. Keep a second tested administrative path until you have verified the new account. - Review root and password access. Follow the provider’s SSH guidance to disable unnecessary direct root or password authentication only after key-based login works in a separate session. Do not close your existing session until the replacement access has been tested.
- Configure the firewall. Permit SSH from an administration network where practical, open only the ports required by the application, and keep database and control-plane ports private unless there is a documented reason to expose them.
- Install monitoring and backups. Enable provider backups or an independent backup job, alert on disk space and failed services, and ensure logs are retained somewhere other than the VPS.
- Recreate the runtime deliberately. Install the web server, language runtime, database client, queue workers and other dependencies from documented versions rather than copying unknown binaries from the old disk.
Hetzner’s setup guidance specifically advises creating a non-root user with sudo privileges and using SSH-key authentication. Apply the same principle on any provider: named accounts and key-based access make later auditing and emergency revocation possible.
Rank #4
- 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
Restore the application without restoring the compromise
Restore in layers. Start with operating-system packages and configuration, then deploy application code, then restore data, and finally enable public traffic. Keep the old backup read-only while you inspect it.
Restore clean configuration
- Recreate service accounts and file ownership instead of preserving arbitrary numeric IDs from the old server.
- Review every startup script, cron job, systemd unit and deployment hook before enabling it.
- Scan uploaded files and dependencies using the security tooling appropriate to your stack.
- Replace secrets with newly generated values. Do not copy a compromised private key or token simply because it is convenient.
Restore data and test privately
Import the database and verify schema versions, row counts and application migrations. Restore uploads and test representative reads and writes. Bind the application to localhost or a private network first, then exercise health checks, login, background jobs, email delivery and payment or webhook callbacks without sending public traffic.
Switch DNS and monitor
When local and external tests pass, update DNS records or reassign the retained address. Confirm both IPv4 and IPv6 behavior, certificate issuance, reverse-proxy headers and redirects. Watch logs, authentication events, resource usage, scheduled jobs and external error reports closely after the cutover.
What to do when the VPS was hacked
Assume credentials and data may have been exposed. Isolate the old server from public traffic if the provider allows it, but do not spend hours trying to prove that a compromised installation is clean. Preserve forensic information only if you have a defined incident-response requirement; otherwise, rebuild or replace the instance and rotate access.
- Revoke and recreate SSH keys that were present on the server.
- Rotate database passwords, API tokens, cloud credentials, webhook secrets, TLS private keys and administrator passwords.
- Review provider audit logs, DNS changes, firewall edits and billing activity.
- Check external services for new users, keys, allowlist entries, scheduled jobs or data exports.
- Deploy from a known-good source revision and inspect dependencies before installation.
- Keep the rebuilt server’s logs and monitoring independent of the old host.
A disk rebuild removes the old operating system; it does not revoke credentials that an attacker may already possess, and it does not erase snapshots or external volumes unless you deliberately handle those resources.
Common mistakes and recovery paths
Deleting files with rm -rf
This can destroy the running system while leaving provider metadata, snapshots, volumes and unauthorized accounts untouched. Stop and use the provider rebuild or reinstall workflow instead.
Best Value
- 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³
Discovering a missing backup after deletion
Check retained snapshots, automated backups, attached volumes and exports in the provider console. Do not assume a destroyed instance removed every related resource, or that every related resource was retained. If no restorable copy exists, recovery may be impossible.
Losing access after hardening
Keep the original session open while testing the new administrative account. If you lock yourself out, use the provider console or Rescue System to repair SSH configuration, restore an authorized key and correct firewall rules.
Application works by IP but not by domain
Check A and AAAA records, TTL and propagation, virtual-host configuration, certificate names and firewall rules. A new address may also need to be added to third-party allowlists and webhook providers.
Background jobs or mail silently fail
Compare the inventory with the rebuilt host. Cron jobs, systemd timers, queue workers, DNS TXT records, reverse-DNS settings and outbound firewall rules are frequently omitted when only the web front end is restored.
Completion checklist
- Backups were opened and a representative restore succeeded.
- Databases, files, certificates, secrets, keys, jobs and firewall rules were inventoried.
- The chosen rebuild or destroy action was confirmed against the correct server and image.
- Volumes, snapshots, backups, floating or reserved IPs and other external resources were reviewed separately.
- A named sudo-capable user and tested SSH key were created.
- Unnecessary root and password exposure was disabled only after alternate access worked.
- Packages, firewall, monitoring and backups were configured on the fresh system.
- Secrets were rotated where compromise was possible.
- Application, database, jobs, certificates, IPv4, IPv6 and external integrations were tested.
- DNS was changed only after the rebuilt service passed private and external checks.
- Logs and alerts are being monitored from outside the VPS.
The Bottom Line
Use the provider’s Rebuild or Reinstall control for a reset, or destroy and recreate the VPS when you need a completely new resource. Back up and test restoration first, preserve external resources deliberately, rotate credentials after any suspected compromise, and treat the first login as a fresh security setup—not as a continuation of the old server.
Recommended Free Tools
Quick Recap
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.




