Skip to main content
Remove all expired storage instances from the machine, freeing up space
This is a host command, used for managing machines you are renting out on Vast.ai.

Usage

vastai cleanup machine ID [options]

Arguments

id
integer
required
id of machine to cleanup

Description

Instances expire on their end date. Expired instances still pay storage fees, but can not start. Since hosts are still paid storage fees for expired instances, we do not auto delete them. Instead you can use this CLI/API function to delete all expired storage instances for a machine. This is useful if you are running low on storage, want to do maintenance, or are subsidizing storage, etc.

Global Options

The following options are available for all commands:
OptionDescription
--url URLServer REST API URL
--retry NRetry limit
--rawOutput machine-readable JSON
--explainVerbose explanation of API calls
--api-key KEYAPI key (defaults to ~/.config/vastai/vast_api_key)