# Managing Functions
source: https://docs.chalk.ai/docs/functions/managing-functions

## List, inspect, and delete deployed Chalk Functions with the chalk CLI and the chalkcompute SDK.

This page covers listing, inspecting, and deleting deployed
functions. The examples use the add function from
Defining a function.

### Listing

```
$ chalk function list
```

Displays a table of the functions in your environment with their ID, name,
current version, latest version, scaling group, status, and creation time.
Pass --name to filter by function name, or --limit to cap the number of
results:

```
$ chalk function list --name=add
```

### Inspecting

```
$ chalk function get --name=add
```

Shows the function's ID, name, creation and update times, current version ID
and number, scaling group, scaling-group revision, scaling-group status, and
input and output schemas. Pass --id instead of --name to look a function up
by its ID.

Each deploy creates a new immutable version. To list a function's versions, or
to show one of them:

```
$ chalk function versions list --name=add
$ chalk function versions get --name=add --version=1
```

To see calls submitted through the function queue, such as
.defer(...)
calls, use chalk function calls. count shows how many calls were submitted
in the past hour, and recent lists the most recent calls with their status,
enqueue time, and trace ID:

```
$ chalk function calls count --name=add
$ chalk function calls recent --name=add --limit=50
```

From the SDK, attach to a function by name and call refresh() to fetch the
current version's details, or versions() to list its versions:

```
import chalkcompute

fn = chalkcompute.RemoteFunction.from_name("add")

info = fn.refresh()
print(info.function_name)
print(info.version)
print(info.is_current)
print(info.scaling_group_name)
print(fn.web_url)

for v in fn.versions():
    print(v.version, v.id, v.created_at, v.is_current)
```

### Deleting

Delete a function and all of its versions through its handle:

```
import chalkcompute

chalkcompute.RemoteFunction.from_name("add").delete()
```

From the CLI:

```
$ chalk function delete --name=add
```

Both tear down the Scaling Group behind each version, including
that group's Kubernetes Deployment, Service, and HTTPRoute, along with the function's schedule and
its Chalk Catalog entry. The underlying records are soft-deleted, so the function still appears in
history. Calling delete() on a function that is already gone succeeds without raising.





