There are a few things you can try. The first is to create a "dig Box". Fill a small box with rice or sand, they should prefer to dig in that the to scratch other things. Try shouting NO! and use and angry face and gesture. Also try time out. Put them in a carrier for a few minutes.