Iniquity, transgression and sin
In the Word three terms are used to refer to bad actions: transgression, iniquity, and sin. Transgression is the least bad. It means a violation of what is true in an external context, a violation of what is right and orderly. Iniquity is next and denotes acts that violate more interior truths. Sin is the worst. It is a violation of what is holy and righteous, a violation against the Lord. Sin is the deepest kind of evil. Regarding iniquity -- to be in charity, or live a life of charity is to live a life where the acts and thoughts that have top priority are those that have within them a love for the neighbor. Sometimes our love of self, our inborn desire to put ourselves first, is stronger than our charity and we do something for ourselves at the expense of our neighbor, or even do harm to our neighbor. Such an act, if our motive is selfish, is an iniquity.
(Reference: Arcana Coelestia 9156, 9965 [2-3])
Arcana Coelestia #4544
4544. 'Remove the gods of the foreigner which are in the midst of you' means that falsities were to be cast aside. This is clear from the meaning of 'removing' as casting aside, and from the meaning of 'the gods of the foreigner' as falsities; for in the Word 'gods' means truths and in the contrary sense falsities, 4402. Those people were called 'foreigners' who were outside the Church and therefore those who were subject to falsities and evils, 2049, 2115; and this explains why 'the gods of the foreigner' means falsities.