hledger import skips an older CSV correction: check .latest
Updated · 2 min read
An older correction in a fresh bank CSV can be absent from hledger import even though full-file conversion shows it. The command’s .latest tracking is based on dates and counts, not a universal bank-event identifier. Compare the full source with your journal before trying a new filename or deleting tracking state.
For a PDF-only correction, LocalExtract can prepare CSV locally. It cannot decide which rows hledger has already processed. The CSV columns are date,description,amount.
The desktop apps export date, description, and amount as CSV. Open CSV in Excel to save an XLSX workbook. Statement support varies: verify the result against your own PDF.
Preserve the journal and the corresponding tracking file
The hledger 1.52 import manual explains .latest.FILENAME, stored beside the input. Preserve the existing journal and that file before investigating. Check whether the bank download still uses the same filename and layout as earlier imports.
Tracking remembers the latest processed date and how many transactions at that date were processed. Earlier dates are skipped; on the latest date, the remembered count is skipped. This is not a comparison of every bank reference against the journal. Same-day ordering and stable input assumptions matter.
Compare a full conversion with the candidate preview
Inspect hledger -f FILE.csv print for the entire converted source, then hledger import FILE.csv --dry-run for new candidates. Keep the same intended rules and journal configuration. These are instructions from the documentation, not commands executed for this article.
In our invented sequence, the tracking date is October 8 with two rows on that date already seen. A later download adds a previously absent correction dated October 6 and a new October 9 row. The new-only view can select October 9 while skipping October 6. An empty or short preview therefore does not prove that the complete download has no accounting changes.
The synthetic tracking worksheet models the date cutoff and includes a same-day count case. Python checks the simplified selection example, not hledger’s actual implementation. Identify the correction’s real reference, amount and prior journal representation before choosing a controlled accounting treatment.
Do not confuse marking as seen with importing
The new-transactions guide introduces this tracking mechanism. A successful non-dry import updates the tracking files only after all input files succeed. --dry-run does not update them. --catchup marks transactions as already seen without importing them; it is not a way to recover the omitted correction.
Renaming the CSV or deleting .latest can make previously processed rows appear new again. Neither action establishes which records are true duplicates. Preserve the original journal and tracking evidence, compare the complete file, and review an identified late correction separately rather than blindly re-importing the history.
For wrong values already visible in full conversion, use the amount-versus-balance rules guide. This page addresses new-only selection and backdated changes. Prepare a PDF source, then keep identity and journal coverage checks separate.
Official hledger 1.52 documentation checked October 16, 2026.
LocalExtract Team
We build LocalExtract, a desktop bank statement converter. Questions or corrections? Contact · Editorial policy