If you find visible larvae or significant infestation, the safest and simplest choice is to discard the affected berries rather than trying to rescue them.
For berries that look sound, wash them thoroughly under clean running water before eating. Washing won’t necessarily eliminate larvae that are already inside fruit, so inspecting the berries is still important.
How Can You Reduce the Problem?
If you’re growing berries at home, several basic practices can help:
Harvest frequently. Don’t allow ripe berries to remain on the plant longer than necessary.
Remove damaged fruit.