The Buddha not only taught us to protect all animals, but also plants. Even plants have lives and grow with dignity. Therefore, unless there is absolutely no space for us to walk around them, we should not step on them because that behavior is an insult and disrespectful to the plants.
Normally, when a tree is as tall as human, there is a tree spirit. In ancient times, monks often lived in mountain huts. Three days before they cut a tree to build the hut, they would respectfully tell of their intention and ask the tree spirit to move to a safe place. This method can be applied to insects. In order to keep our houses and environment clean and our family healthy, we can stand in front of a statue of the Buddha or Bodhisattva three days before our actions and ask the insects to move. Some people who have done so with sincere and kind hearts have received good results.
(Adapted from http://www.buddhanet.net/pdf_file/artliv12.pdf)