Love forgives, so, of course, love does not keep grudges. So, God does not keep grudges. But the Father of All is also the Judge of All.
I have a faint memory of a Bible passage that says God keeps a record of our deeds. Most people associate that with a record of our wrongs. However, if my memory is correct, it is a record of our deeds – good and bad. Sill, God does not need a record of anything. He knows all things. He already knows our deeds. And he already knows that we are born in rebellion to him. We are already condemned without a single entry in any book.
As the Judge, who holds all the world accountable, he judges us based on our rebellion.
As the Father, who loves all, and wants a relationship with all, he forgives all those who give him allegiance, who become his children. He nailed our sins to the cross, and killed them. He says he will forget our sins.
If someone you love does something wrong to you, you probably do not forget it. But, for the sake of the loved one, for the sake of the relationship, you forgive, and put the wrong behind you. You treat the wrong as if it never happened.
It is impossible for the All-Knowing God to “un-know” something. But, he can choose to put our sins behind him, to treat them as if they never happened.
He “forgets” our sins for the sake of the child he loves, to restore his family, to renew the relationship. He views us through our position in Christ, and the sacrifice of Christ. He treats us according to the identity he has won, and proclaimed, for us: child, priest, ambassador. Dead, buried, raised and seated with Christ.