---
name: "cleartrans-cli"
section: "1"
platform: "linux"
package: "ledgerhelpers"
version: "0.3.10-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cleartrans-cli"
---

# cleartrans-cli(1)

interactively clear transactions in a ledger file

## NAME

cleartrans-cli - interactively clear transactions in a ledger file

## SYNOPSIS

**cleartrans**

## DESCRIPTION

**cleartrans-cli** is a text program for quickly clearing transactions in a ledger file.

This program looks for all uncleared transactions in the ledger file, whose effective date is not in the future. For each such transaction, it asks whether the transaction should be cleared, and prompts for an effective date for the transaction.

The resulting ledger is written to a new file, and atomically renamed to the original filename. This prevents accidental loss of data.

The program must be supplied with location of the ledger file to work with. The location of the file is determined using the following mechanisms, in this order. The first mechanism which yields a result, wins.

## ENVIRONMENT

The following environment variable is recognized by this program:

- **LEDGER\_FILE**

  Path to ledger file to work with.

## FILES

The config file for [**ledger**(1)](/ledger/1.md), namely file **.ledgerrc** in user's home directory is scanned looking for the following option.

- **--file FILE**

  Path to ledger file to work with.

## SEE ALSO

[**ledger**(1)](/ledger/1.md), [**addtrans**(1)](/addtrans/1.md), [**sellstock-cli**(1)](/sellstock-cli/1.md), [**sorttrans-cli**(1)](/sorttrans-cli/1.md), [**withdraw-cli**(1)](/withdraw-cli/1.md).
