What you can use is, shredded paper. Like if you have a paper shredder at home, just use that.
ie: make a huge mound of it, or put it in a box, and she can dig through it.
When my kids were a Toddler, they went to a kids event in the neighborhood, and in 1 corner of the room, was a huge mound of shredded paper. And in it, they had child safe sized "toys" that the kids could find. For fun, of course.
And the kids, loved it.
Or, just let her dig in dirt.
You can, as an alternative, buy potting soil in a bag, from the garden store. It is free of bugs and sanitized etc. And you can just dump it in a box or in your yard in a mound, and just let her dig through it.
Or as Jen C. said below, just let her dig in a plot in the garden.
My son is 6, and loves to dig, and I let him have a place in the garden, a "plot" of his own, to dig around in. He loves it. And he has his own gardening tools.
Sand boxes are fine. Sure, it can be messy, but that is part of the fun for a kid. Just put a big plastic tarp under it, and then whatever falls onto it, you just sweep it up or gather up the tarp and then dump it back into the box.
I did that with my kids. Or they had "Moon Sand." Which I let them play with and have a go at it, and I simply put down a huge plastic mat under it all, and it was fine.
Or, pet stores have various types of litter. We have a rabbit. And, there are, pellet litter that is made of recycled paper. You could buy a bag of that, put it in a box or container, and let her dig through that.
It is clean. And pellets are easy to just sweep up.
I would not use any type of "food" alternatives as a digging toy. Because, it will attract bugs and mold.
And, whenever your daughter is digging around in dirt or sand, just put on some "home clothes" so that she doesn't get any "nice" clothes dirty. ie: home clothes, which is what I taught my kids, are clothes that are perfectly good still albeit a bit stained. And these clothes, are used ONLY at home when playing especially when having fun playing and getting dirty. Then that way, no "nice" clothes is ruined.