Functions are blocks of code that run on demand without the need to manage any infrastructure. Develop on your local machine, test your code from the command line (using doctl
), then deploy to a production namespace or App Platform — no servers required.
Namespaces are a level of isolation and organization for functions and their settings. All functions and projects must be created in a namespace. Destroying a namespace permanently destroys all of its projects and functions.
Use the doctl serverless namespaces delete
command to destroy an existing namespace, specifying either the namespace label or ID:
doctl serverless namespaces delete example-namespace-label
doctl serverless namespaces delete fn-EXAMPLE-ID-7c17-4446-a1dd-5b1c4c247e08
You are prompted to confirm the deletion. Type y
then Enter
to confirm:
Deleting namespace 'fn-5073b12e-7c17-4446-a1dd-5b1c4c247e08' with label 'sea-turtle-fn-namespace'.
Warning: Are you sure you want to delete this namespace? (y/N) ? y
Namespace successfully deleted
The namespace is destroyed, along with all of the projects and functions that were in the namespace.
There are two places to destroy a namespace in the control panel. First, from the namespaces listing on the main Functions page you can click the … “more” menu next to a namespace, then select Destroy Namespace:
Alternately, from inside the namespace you can click its Settings tab, then choose Destroy.
Either method presents you with a confirmation prompt. Enter the ID of the namespace then press Destroy to confirm.
The namespace is destroyed, along with all of the projects and functions contained within.