Reinstalling Linux or Windows on a VPS Without Losing Your Mind
You've got a cheap VPS, the OS is outdated or broken, and the provider's control panel offers exactly one reinstall option you don't want. Or maybe you're staring at a server that won't boot and you just need to get back to a clean Linux install. Either way, the usual path involves support tickets, cryptic rescue modes, or a manual process that eats an afternoon. The reinstall project is a one-script answer to that problem.
What It Does
reinstall is a shell script that reinstalls the operating system on your VPS. It handles Linux to Linux, Linux to Windows, Windows to Windows, and Windows to Linux — any direction you need. On the Linux side it supports around 20 common distributions. On the Windows side it pulls official ISOs rather than custom-built images, automatically finding the ISO link and installing drivers like VirtIO that public clouds require.
The script also covers a few adjacent jobs: DD-ing a raw image straight to disk, booting into an Alpine live OS in memory, and jumping to netboot.xyz. It works with both BIOS and EFI boot, and it supports ARM servers. Everything it downloads comes from upstream mirror sources in real time — there are no bundled custom packages.
Why It's Cool
The headline feature is the any-direction reinstall, but the details underneath are where this thing earns its keep.
-
It's built for small VPS instances. The README is explicit that it needs less memory than the official netboot approach. If you're running a 512 MB box — and plenty of people are — that difference matters.
-
Networking setup is genuinely smart. Automatic IP configuration that figures out static versus dynamic on its own, plus support for
/32,/128, gateways outside the subnet range, IPv6-only setups, and the awkward case where IPv4 and IPv6 live on different network cards. These are exactly the edge cases that turn a simple reinstall into a two-hour debugging session. -
It identifies disks by partition table ID. This sounds boring until you remember that writing to the wrong disk on a remote server is unrecoverable. Using the partition table ID rather than a device name is a deliberate safety choice, and it's the kind of decision that tells you the author has been burned before.
-
Windows installs use official ISOs. No mystery images, no third-party repacks. You get the real thing, with the drivers your cloud environment needs installed automatically.
-
It doesn't ship its own packages. All resources are fetched live from mirror sources, so you're not trusting a random bundled blob — you're trusting the distro mirrors you'd trust anyway.
The project also has active quality checks (Codacy, CodeFactor) and a Telegram group for feedback, which suggests it's maintained rather than abandoned after one commit.
How to Try It
Start by downloading the script on your current system. The README's quick-start section is organized by task, so you can jump straight to what you need:
- Reinstall to Linux
- DD a raw image to disk
- Boot into Alpine live OS in memory
- Boot into netboot.xyz
- Reinstall to Windows from ISO
Before you run anything, check the system requirements table. Target systems have specific memory and disk minimums — Alpine, for example, lists 256 MB of RAM and 1 GB of disk. Make sure your VPS meets those before you start, because a failed reinstall on a remote machine is not a fun place to be.
There's also a cancel-reinstall option documented in the README, which is worth knowing about before you kick things off.
Head to the repository for the full command reference, the complete distribution list, and the requirements table. The README is available in both Chinese and English.
Final Thoughts
This is a practical tool aimed at a specific audience: people running VPS instances who need to change the OS without provider cooperation. It's not glamorous work, but the attention to networking edge cases, disk safety, and low-memory environments shows it was built by someone who actually uses it. If you manage servers on budget hosts, or you've ever wished you could just reinstall Windows on a Linux box, this is worth bookmarking. Read the requirements first, test on something disposable if you can, and keep the cancel option handy.
Follow @githubprojects for more developer tools and open source projects.