Find a command/
中文
☰

00 / START CLEAN

Start from a clean system.

Provider templates often ship monitoring agents, extra software, odd partitions, and old kernels. Reinstall an official image first so every later step starts from a known state.

Powered by an open-source project

The reinstall is done by bin456789/reinstall by bin456789 (GPL-3.0). EnvSH only helps you pick options and builds the command; it does not modify or host the script.

Reinstall first when

  • A new KVM or Xen VPS running a provider-made template.
  • The provider panel lacks the system or version you want.
  • You inherited a machine and want a known clean start.
  • Still in the refund window? Check the server first with benchmark tools.

Skip it when

  • The panel offers official images: use it, it is safer and easy to retry.
  • OpenVZ or LXC containers: the kernel is the host’s, so this cannot work.
  • There is data to keep: back it up elsewhere first. The whole disk is erased.

Step 1: Check the current system (read-only)

Also open the provider panel and confirm the VNC or serial console works. If anything fails, that is your way back in.

Virtualization and CPU architecture

Read-only
systemd-detect-virt 2>/dev/null || cat /sys/class/dmi/id/product_name
uname -m

Expect: kvm, xen, vmware, or microsoft can be reinstalled. openvz or lxc is a container: the kernel belongs to the host, so a reinstall is impossible. Use the provider panel instead.

Memory and disk

Read-only
free -h
df -h /

Expect: Compare with the requirements of the system you pick below.

Write down the network settings

Read-only
ip -br addr
ip route

Expect: reinstall.sh configures the network automatically. Keep the IP and gateway anyway, in case you need the provider VNC console.

Step 2: Choose a system and build the command

Target system

Debian / Ubuntu

Rocky / AlmaLinux / CentOS Stream

Alpine

Minimum: 256 MB RAM, 1.5 GB disk (from the upstream README)

How you will log in
Download source & kernel
Script download

Both URLs are the same upstream file. cnb.cool is a public raw mirror for when GitHub is slow.

Output & execution identity
How to use it

Paste mode stops on errors inside a subshell, preserving your SSH session. Script mode is for reviewing and saving a file.

Run as

A fresh reinstall is root, so the default commands have no sudo. Choose sudo when you are a normal user and sudo is already installed.

reinstall.txt
Tick the confirmation on the left to show the command.

Running it does not erase anything until the reboot. Before rebooting, bash reinstall.sh reset cancels. During installation, watch progress in the provider VNC, over SSH, or at http://YOUR_SERVER_IP.

Step 3: After the reinstall

For speed, upstream does not update the new system. After logging in, go to Initialize and tick “Upgrade system packages”.

Forget the old host key

Read-only
ssh-keygen -R YOUR_SERVER_IP

Expect: Run on your own computer. The new system has a new host key, so SSH otherwise refuses with "REMOTE HOST IDENTIFICATION HAS CHANGED".

Log in to the new system

Read-only
ssh root@YOUR_SERVER_IP

Expect: Installation usually takes a few minutes. If it does not answer after 15–20 minutes, watch progress in the provider VNC console. Add -p PORT if you changed the SSH port.

Next: initialize the new system →

Install failed? SSH stays reachable in the installer for manual rescue, and non-Debian targets can run /trans.sh alpine to fall back to Alpine. See the upstream README.