
Operations on Virtual Private Servers
40
Deleting Virtual Private Server
You can delete a Virtual Private Server that is not needed anymore with the
vzctl destroy
VPS_ID
command. This command removes the Virtual Private Server private area completely
and renames the VPS configuration file and action scripts by appending the
.destroyed
suffix to them.
A running VPS cannot be destroyed with the
vzctl destroy
command. The example below
illustrates destroying VPS 101:
# vzctl destroy 101
VPS is currently mounted (umount first)
# vzctl stop 101
Stopping VPS ...
VPS was stopped
VPS is unmounted
# vzctl destroy 101
Destroying VPS private area: /vz/private/101
VPS private area was destroyed
# ls /etc/sysconfig/vz-scripts/101.*
/etc/sysconfig/vz-scripts/101.conf.destroyed
/etc/sysconfig/vz-scripts/101.mount.destroyed
/etc/sysconfig/vz-scripts/101.umount.destroyed
# vzctl status 101
VPS 101 deleted unmounted down
If you do not need the backup copy of the VPS configuration files (with the
.destroyed
suffix), you may delete them manually.