Follow a bad deed with a good one
Abu Dharr and Mu’adh bin Jabal (radi Allahu anhum) reported that the Messenger of Allah (sal Allahu alaihi wa sallam) said, “Fear Allah wherever you are, do good deeds after doing bad ones, the former will wipe out the latter, and behave decently towards people”
Virtue obliterates vice means that virtue becomes an atonement for sin. But this applies to minor sins only because major ones will not be forgiven without sincere repentance. Similar is the case of violation on public rights which will not be forgiven without their compensation.
And Allah Knows Best!