Jesus breathed on them and said, "Receive the Holy Spirit. If you forgive anyone his sins, they are forgiven; if you do not forgive them, they are not forgiven." (John 20:22-23)
Forgive in the bible is often a poor translation because it does not mean, "stop holding something against someone." The word forgive actually means "release/set free" or "remove/take away." "If you release anyone of his sins, he is set free from them; if you do not release them, he is not set free from them."
This is speaking about the freedom that the gospel brings. If the disciples, through the power of the Spirit, told people the good news of what Christ has done those people were set free from sin. If they did not tell people of what Christ has done those people will not experience the freedom He has provided.
Hearing & trusting in the gospel is what sets people free from sin! Jesus wasn't giving His disciples permission to save some & condemn others. He wasn't giving them the ability to override people's freewill, Jesus didn't even do that. He was telling them of the effective reality of the gospel. If they suppress the Spirit, the freedom it could bring through them is also negated. I think Paul echos Jesus' statement in Romans 10:13-15,
"Everyone who calls on the name of the Lord will be saved." But how can they call on him to save them unless they trust in him? And how can they trust in him if they have never heard about him? And how can they hear about him unless someone tells them? And how will anyone go and tell them without being sent? Just as it is written, "How beautiful are the feet of messengers who bring good news!"
So Jesus' words in John are like another form of the great commission. He is essentially saying, "You have been given the power of the truth that frees people from sin. If you don't tell them they cannot be freed. Don't hold back!" This is why we don't see the disciples going around "forgiving people of sins" or setting up confessional booths but we do see them proclaim the good news. The good news is that Christ has already provided freedom from sins (forgiveness of sins). The freedom is there but the knowledge of the truth is required for people to "be set free." Christ took away the sins of the world. Once people know that they are already released from sin they are freed up to see God & to trust Him.
"If you send away the sins of any their sins have been sent away from them. If you hold the sins of any, they have been retained." What this means is the disciples had the ability to lift burdens or leave burdens. "If you release anyone of his sins, he is set free from them" in other words, "He who the Son sets free is free indeed." The freedom is irrevocable.