General:
* Accidentally
* Inadvertently
* By mistake
* Without meaning to
* Unwittingly
More specific:
* Carelessly: suggests a lack of attention or thought.
* Negligently: suggests a failure to take proper care.
* Inadvertently: emphasizes a lack of conscious awareness.
* Unknowingly: emphasizes a lack of knowledge.
* Haphazardly: suggests a lack of planning or organization.
The best synonym to use will depend on the specific situation and the nuance you want to convey.