> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Clear primary calendar

> Permanently remove every event from the connected user's primary calendar.

`clearPrimaryCalendar` irreversibly clears all events from the primary calendar.
It cannot target a secondary calendar.

## Example

```ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { clearPrimaryCalendar } from "automate.ax/google-calendar"

export default automation("Reset the primary calendar", () => {
  onHttpRequest({ scope: "automation" })

  clearPrimaryCalendar({})
})
```

## Inputs

Only `account` is optional; it selects the Google account whose primary
calendar will be cleared.

## Output

Returns `Signal<"primary">` after Google accepts the operation.

<Warning>
  This permanently removes all primary-calendar events. It does not merely hide
  or unsubscribe from the calendar.
</Warning>
