bulk delete transactions

Alexi Kostibas alexi at kostibas.com
Sun May 11 17:53:20 EDT 2014


Tarlika Elisabeth Schmitz <gnucash <at> numerixtechnology.de> writes:

> 
> I have an account with a zero balance containing thousands of
> transactions.
> 
> I would like to delete all these transactions. I tried it by deleting
> the account using the delete transactions option. However, this only
> deleted the split in the deleted account and left me with thousands of
> IMBALANCEs in the other account.
> 
> Is there any way I can bulk delete these?

I realize this is an ancient thread, but I needed to do the same thing myself[1]
and couldn't find a way, so I ended up writing a crappy PHP script to
accomplish the task. You can find it here: http://pastebin.com/3yHv6Ang

Maybe it will be useful to someone in the future!

-Alexi

[1] My reason for needing to do this was: I am the treasurer of my apartment,
and for the last few years had been managing the apartment's finances in a
sub-account of my own personal finances. This has obvious drawbacks, as
the apartment's finances are not at all "mine" and so reports by default would
contain income / expenses for the building. I finally went to make this right
by making a copy my personal .gnucash file and tried to delete all my personal
data from it, so as to preserve most of the apartment's expense history. This
left me with thousands upon thousands of "Imbalance" transactions, and no
way to get rid of them. Thus I wrote this script, which seems to have solved
the problem.




More information about the gnucash-user mailing list