kamakiri teardown
Usage
kamakiri teardown [--no-wait]
It deletes the site the current directory is linked to, after asking.
$ kamakiri teardown
This will permanently delete "my-site" and remove it from kamakiri-pages.jp.
Are you sure? (y/N) y
Tearing down... done.
Removed .kamakiri/config.json
$ kamakiri teardown
"my-site" を完全に削除し、kamakiri-pages.jp からも削除します。
本当によろしいですか? (y/N) y
サイトを削除中... 完了しました。
.kamakiri/config.json を削除しました
The prompt defaults to N. Only y or Y goes ahead; Enter or any other answer stops with nothing deleted.
What it removes
The site stops being served and is deleted, its subdomain becomes free for any new site, and .kamakiri/config.json is removed. Your build output is untouched, so kamakiri init and a deploy put the same content back.
If the site is already gone on our side, the command removes .kamakiri/config.json without asking.
A site with WebAccel
Teardown does not delete a WebAccel resource, since it lives in your own Sakura account. The run names the resource it leaves, so you can delete it in the Sakura Cloud control panel.
To have the CLI delete it instead, run kamakiri cdn none --no-wait and then kamakiri cdn cleanup before teardown. Cleanup deletes only resources that no domain uses, so it leaves alone every resource the site still serves through. Once the site is gone, the CLI can no longer reach the resource. kamakiri cdn covers both commands.
The wait
The command returns once the site is no longer served. --no-wait returns as soon as the deletion is accepted. .kamakiri/config.json is removed either way, and also when you press Ctrl-C during the wait.
If the deletion fails on our side, the Tearing down... line ends in a failure that names the step it stopped at. The local link is already gone by then, so write to support@kamakiri-labs.jp with the line the command printed.
Exit status
- 0. The site is deleted and no longer served; with
--no-wait, the deletion was accepted; you answered anything buty; or the site was already gone. - 1. No site is linked; there is no credential or the API key is rejected; the server no longer supports this client version; a request fails or is refused; the deletion failed on our side.
- 130. You pressed Ctrl-C during the wait. The teardown carries on.