sap-housekeepinglisted
Install: claude install-skill adam0thman/sap-basis-ops
# SAP Housekeeping (logs / traces / spool / jobs / filesystem)
Two layers: **ABAP-side reorg jobs** (the correct, retention-aware way — §1) and **OS-side file cleanup**
(§3, for what the jobs don't cover). DB log/trace cleanup is delegated to
[sap-db-command-reference](../sap-db-command-reference/SKILL.md) (§6).
> **Guardrail — deletion is destructive and sometimes compliance-bound.**
> Identify SID/host → classify PRD → **preview what will be deleted and how far back** → confirm (typed
> for PRD) → delete → verify. Specific hazards, do NOT skip:
> - **Audit logs are often legally required** — check retention with security/auditors before deleting (§4).
> - **Never delete DB logs/archives that aren't backed up** — data-loss risk (§6).
> - **Prefer the standard reorg jobs** (they honour configured retention) over manual `rm`.
> - Never `rm` a **live** trace of a running instance.
---
## 1. The standard reorganization jobs (the right way) — SAP Note 16083 [G, K1]
Schedule these in **SM36** ("Standard jobs" button auto-creates them). They delete by **age/retention**,
not blindly. ABAP-side, so OS-independent.
| Job name | Report | Cleans | Frequency |
|----------|--------|--------|-----------|
| `SAP_REORG_JOBS` | `RSBTCDEL2` | old background **job logs** (SM37) | daily |
| `SAP_REORG_SPOOL` | `RSPO1041` (improved `RSPO0041`) | old **spool** requests (SP01) | daily |
| `SAP_REORG_ABAPDUMPS` | `RSSNAPDL` | old **ABAP short dumps** (ST22) | daily |
| `SAP_REORG_BATCHINPUT` |