# Clear Configs

> Remove the local config files written by first-time setup (bucket.json and the agentic-analytics AWS profile). Leaves the events cache alone. Use when the user wants to start setup over, entered the wrong bucket name, or asks to reset/clear the plugin's configuration.

- Skill: `automattic/clear-configs` (Agent Skill)
- Install (CLI): `npx skillmds@latest add automattic/clear-configs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/automattic/clear-configs/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: Automattic (https://skillmd.com/u/automattic)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/automattic/clear-configs

---


# Clear local configs

Removes two things to put the user back at first-run state:

- `${XDG_CONFIG_HOME:-~/.config}/agentic-analytics/bucket.json` – runtime config init writes.
- The `agentic-analytics` profile in `~/.aws/credentials` and `~/.aws/config` – the AWS creds the user set up via `aws configure`.

Leaves the data lake at `${AGENTIC_ANALYTICS_DATA_DIR:-~/.local/share/agentic-analytics}/` (DPL parquet + `catalog.duckdb`, and the plugin's `venv/`) alone. Re-pulling DPL is slow; the lake is data, not config. To rebuild it, run `/agentic-analytics:refresh-cache` instead.

After running this, the init flow walks the user through setup again from scratch (asks for the bucket, walks them through `aws configure`).

## Output discipline

This is a one-shot housekeeping flow. Output the verbatim line below at the start, run the script, then stop. Don't narrate the script output.

## Steps

0. **Resolve the plugin root.** The snippet below assumes `$plugin_root` is set in that shell invocation:

   ```bash
   plugin_root="${CLAUDE_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-<plugin-root>}}"
   plugin_python="${AGENTIC_ANALYTICS_VENV:-${AGENTIC_ANALYTICS_DATA_DIR:-$HOME/.local/share/agentic-analytics}/venv}/bin/python"
   [ -x "$plugin_python" ] || plugin_python="python3"
   ```

   `<plugin-root>` is the plugin's install directory – the directory two levels above this SKILL.md file. In a dev checkout of the source repo that's `plugin/`. `$plugin_python` is the plugin's isolated venv (created by the init flow at `$AGENTIC_ANALYTICS_DATA_DIR/venv`, default `~/.local/share/agentic-analytics/venv`); it falls back to `python3` if the venv doesn't exist yet.

1. **Announce.** Output verbatim:

   > Clearing local agentic-analytics configs. Events cache stays put.

2. **Run the script.** It prints what was cleared (or `(nothing to clear)` if everything was already gone):

   ```bash
   "$plugin_python" "$plugin_root/scripts/clear_configs.py"
   ```

