OS Manuals

ostree-prune(1)

OSTREE PRUNE(1) ostree prune OSTREE PRUNE(1)


.SH "NAME" ostree-prune - Search for unreachable objects


.SH "SYNOPSIS"


.HP 312u


ostree prune [OPTIONS...]


.SH "DESCRIPTION"


.PP This searches for unreachable objects in the current repository. If unreachable objects are found, the command delete them to free space. If the --no-prune option is invoked, the command will just print unreachable objects and recommend deleting them.


.SH "OPTIONS"


.PP --no-prune


Only display unreachable objects; don't delete.


.RE


.PP --refs-only


Only compute reachability via refs.


.RE


.PP --delete-commit=COMMIT


Specify a COMMIT to delete.


.RE


.PP --keep-younger-than=DATE


All commits older than DATE will be pruned. The format of DATE is the same as that accepted by GNU date utility - for more information see info date.


.RE


.PP --keep-unreferenced-younger-than=DATE


Keep otherwise unreferenced commits newer than DATE. This is useful when commits may be created concurrently with pruning. The format of DATE is the same as that accepted by GNU date utility - for more information see info date. Commits timestamped exactly at DATE are kept.


.RE


.PP --depth=DEPTH


Only traverse DEPTH (integer) parents for each commit (default: -1=infinite).


.RE


.PP --static-deltas-only=DEPTH


This option may currently only be used in combination with --delete-commit. Previous versions of ostree silently accepted the option without that, and ignored it. However, there are desired use cases for pruning just static deltas (while retaining the commits), and it's likely at some point this option will be supported for use cases outside of just --delete-commit.


.RE


.PP --commit-only


Only traverse and delete commit objects. This leaves orphaned meta and content objects, which can be cleaned up with another prune invocation. One may want to use this option to cheaply delete multiple commits, and then clean up with a more expensive prune at the end.


.RE


.SH "EXAMPLE"


.PP $ ostree prune


Total objects: 25627
No unreachable objects

OSTree

ostree 2026.5-r0 · enterprise-packages · ingested 2026-10-24