---
name: "flow-expire"
section: "1"
platform: "linux"
package: "flow-tools"
version: "1:0.68-12.5+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/flow-expire"
---

# flow-expire(1)

Manage storage of flow file archives by expiring old data.

## NAME

**flow-expire** — Manage storage of flow file archives by expiring old data.

## SYNOPSIS

**flow-expire** \[-h\]  \[-d *debug\_level*\]  \[-e *expire\_count*\]  \[-E *expire\_size*\] -w *workdir*

## DESCRIPTION

The **flow-expire** utility will remove the oldest flow files in a directory based on either a count of files or space utilization.  The directory is recursively searched for flow files.  Files that do not have a flow-tools signature will be ignored.  The internal timestamp is used so backups or copies of the flow files that do not retain the original timestamp will not impact the operation of **flow-expire**.  **flow-expire** is typically used to manage storage in a distributed environment where flows are collected on a different server than they are archived.

## OPTIONS

- \-d *debug\_level*

  Enable debugging.

- \-e *expire\_count*

  Retain the maximum number of files so that the total file count is less than *expire\_count*.

- \-E *expire\_size*

  Retain the maximum number of files so that the total storage is less than *expire\_size*.  The letters b,K,M,G can be used as multipliers, ie 16 Megabytes is 16M.

- \-h

  Display help.

- \-w *workdir*

  Work in **workdir**.

## EXAMPLES

Remove the oldest flow files in **/flows/krc4** until the total storage is less then 2 Gigabytes.

  **flow-expire -E2Gig -w /flows/krc4**

Remove the oldest flow files in **/flows/krc4** until the total number of files is less then 100.

  **flow-expire -e100 -w /flows/krc4**

## BUGS

Empty directories are not removed.

## AUTHOR

Mark Fullmer maf@splintered.net

## SEE ALSO

[**flow-tools**(1)](/flow-tools/1.md)
