How to Drop a Partition in ClickHouse

Last updated July 25, 2026 · By the SaturnSQL team

Use ALTER TABLE ... DROP PARTITION with the partition value, e.g. 202601 for a toYYYYMM key. Dropping a partition deletes its files directly, making it by far the cheapest way to remove bulk data, unlike DELETE which rewrites parts.

List partitions first

SELECT partition, sum(rows) AS rows,
       formatReadableSize(sum(bytes_on_disk)) AS size
FROM system.parts
WHERE active AND table = 'events'
GROUP BY partition
ORDER BY partition;

Drop one partition

ALTER TABLE events DROP PARTITION 202601;

The partition value must match the PARTITION BY expression's output. Use DETACH PARTITION instead if you want the data moved aside and re-attachable rather than deleted.

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Related ClickHouse guides

© 2026 Panda Capital Oy Ab. All rights reserved.