James 1:21 English Standard Version (ESV) Therefore put away all filthiness and rampant wickedness and receive with meekness the implanted word, which is able to save your souls.
In our past there has been an understanding that we must clean ourselves up to be accepted by God. This verse in James may have fed those feelings. As with all things spiritual, we must look at them in the light of truth and not supposition.
Look at the last element of this verse, the saving of a soul. If we look at salvation as a single event then cleaning up our act would be deemed necessary for salvation.
1 Corinthians 15:30-33 English Standard Version
30 Why are we in danger every hour? 31 I protest, brothers, by my pride in you, which I have in Christ Jesus our Lord, I die every day! 32 What do I gain if, humanly speaking, I fought with beasts at Ephesus? If the dead are not raised, “Let us eat and drink, for tomorrow we die.” 33 Do not be deceived: “Bad company ruins good morals.”
If spiritually speaking Paul died every day then salvation is renewed every day. The issue here is found in the behavior of keeping bad company. Putting away every filthy thing can be seen then as a call to stop hang out with people that will rub off on us.
Then again we are called to witness Christ to the lost and it seems we cannot get away from every filthy thing since we are called to do that. So once again we are asked to search the scriptures in how to do both.
Matthew 10:11-14 English Standard Version
11 And whatever town or village you enter, find out who is worthy in it and stay there until you depart. 12 As you enter the house, greet it. 13 And if the house is worthy, let your peace come upon it, but if it is not worthy, let your peace return to you. 14 And if anyone will not receive you or listen to your words, shake off the dust from your feet when you leave that house or town.
Let the peace of God lead us.