Reinstalling the operating system on your VPS gives you a completely fresh start. Whether you want to switch from one Linux distribution to another, clean up a misconfigured server, or recover from a compromised system, the reinstallation process wipes everything and gives you a clean slate.
This guide walks you through the entire process, including preparation, the reinstallation steps, and post-installation configuration.
When to Reinstall Your OS
Common reasons for reinstalling include:
- Switching operating systems — Moving from Ubuntu to Debian, or from Linux to Windows Server (or vice versa). See Available Operating Systems for VPS.
- Starting fresh — When accumulated changes, experiments, or misconfigurations make it easier to start over than to fix.
- Security incident recovery — If your server has been compromised, a clean reinstallation ensures no malicious software remains.
- Performance issues — A fresh install eliminates software bloat and conflicting configurations.
- Upgrading to a new OS version — While in-place upgrades are possible for some distributions, a clean install is often more reliable.
Before You Reinstall
Reinstalling the OS permanently deletes all data on the server. This includes files, databases, application configurations, SSL certificates, cron jobs, and everything else stored on the disk. Take these steps before proceeding:
1. Back Up Your Data
- Create a snapshot as a safety net. See How to Create and Restore VPS Snapshots.
- Download critical files via SSH, SFTP, or SCP to your local machine.
- Export databases using tools like
mysqldumporpg_dump. - Save configuration files — web server configs, application settings, SSH keys, firewall rules, cron jobs.
- Document your setup — Note installed software, services, port configurations, and custom settings so you can recreate them.
2. Notify Stakeholders
If the server hosts production services, inform your team, users, or clients about the planned downtime.
3. Plan Your Post-Installation Steps
Write down everything you need to do after the fresh install:
- Software to install.
- Configurations to apply.
- Data to restore.
- DNS records to verify.
- Firewall rules to set up.
Step-by-Step Reinstallation
Step 1 — Navigate to Your Server
Step 2 — Initiate the Reinstallation
Step 3 — Choose Your Operating System
Select the operating system you want to install. Options include:
- Linux distributions: Ubuntu, Debian, AlmaLinux, Rocky Linux, Fedora, and others.
- Windows Server editions (if available on your plan).
Step 4 — Configure Initial Settings
Depending on the OS and the dashboard options, you may be able to configure:
- Root password — Set a new root (or administrator) password. Use a strong, unique password.
- SSH key — Upload or select an SSH public key to be installed on the server for key-based authentication.
- Hostname — Set the server's hostname.
Step 5 — Confirm and Start
Step 6 — Wait for Completion
The reinstallation process typically takes 2 to 10 minutes, depending on the operating system. During this time:
- The server is powered off.
- The existing disk is wiped.
- The new operating system is installed.
- The server is powered back on.
After Reinstalling
Connect to Your Server
Connect via SSH using the new root password or SSH key you configured:
ssh [email protected]Or use the web console in your Data Mammoth dashboard. See How to Connect to Your Server via SSH.
Initial Security Steps
Immediately after connecting:
Restore Your Data
If you have data to restore from your pre-reinstallation backup:
Reinstall Applications
If you were using marketplace applications, you can redeploy them from the Data Mammoth marketplace. See How to Install an App from the Marketplace.
Create a Baseline Snapshot
After your fresh setup is complete and verified, create a new snapshot. This becomes your new "clean install" restore point that you can return to in the future.
Things That Are Preserved After Reinstallation
While the disk contents are completely replaced, some server attributes remain unchanged:
- IP address — Your server keeps the same IP address (e.g.,
203.0.113.10). No DNS changes are needed. - Server plan — Your resources (CPU, RAM, storage) remain the same.
- Add-ons — Any add-ons attached to the server (additional IPs, DDoS protection) remain active.
- Cloud firewall rules — Firewall rule groups assigned to the server remain assigned (though you should verify they are still appropriate for the new OS).
Things That Are Lost After Reinstallation
- All files, directories, and data on the disk.
- All installed software and packages.
- All configuration files (web server, database, SSH, firewall, cron).
- All user accounts created on the server.
- All SSL/TLS certificates.
- All databases and their contents.
- Snapshots remain available separately but the server's current state is replaced.
What to Do Next
- Available Operating Systems for VPS — Compare OS options before reinstalling.
- How to Connect to Your Server via SSH — Access your freshly installed server.
- How to Create and Restore VPS Snapshots — Create a snapshot of your clean install.
- How to Set Up Cloud Firewall Rules — Secure your fresh server immediately.