Cannot Delete Demo Company in ERPNext Due to References in Live Company

Hi,
I have two companies in ERPNext: Demo and Live. The Live company’s Chart of Accounts was created based on the Demo company. Now, when I try to delete the Demo company, I get an error stating: “You can’t delete this company because it is referred in the Company data of the Live company.”
I’ve tried checking for references but can’t find them. Can anyone guide me on how to remove all links to the Demo company so I can delete it?

Thanks!

because you “Create Chart Of Accounts Based On” → Existing Company. maybe you can’t delete it but it’s possible using the server side using some logic.

First you have to check locally.