Questioner: What should we do if we kill something unknowingly?
Dadashri: Even when it is done in ignorance, once you become aware of your deed, you should feel remorse immediately. You should repent for it and do pratyakhyan. Beware that it does not happen again. This should be your goal. God had told us to be firm and resolute in our determination not to kill any living thing. Every morning when you begin your day, you must repeat this five times: "I do not wish to hurt a single living being through my mind, my speech, or my body." You will lighten the burden of your responsibility because in reality you only have control over your intent. To hurt or not to hurt any living being is not in your hands as far as result is concerned.
Questioner: Do we still commit a sin if we hurt someone by accident?
Dadashri: What would happen if you put your hand in the fire by accident?
Questioner: My hand would burn.
Dadashri: Would a child not burn himself too?
Questioner: Yes he would.
Dadashri: Even a child? You will not escape, whether you do something knowingly or unknowingly.
Book Name: Pratikraman - The key that resolves all conflicts (Page #57 Last Second Paragraph and Page #58)