It is narrated from Sayyiduna Sa'd bin Abi Waqqas (may Allah be pleased with him) that he said: "I swore by al-Lat and al-Uzza, and my companions said: 'You have said something very obscene.' So I came to the Prophet (peace and blessings be upon him) and said: 'My covenant (of passing from disbelief to Islam) is still recent, and I have sworn by al-Lat and al-Uzza.' The Messenger of Allah (peace and blessings be upon him) said: 'Say three times, "There is none worthy of worship except Allah, alone," then spit to your left three times, and seek refuge with Allah from Satan three times, and never do it again.'"
Imam Ahmad (may Allah have mercy on him) also narrated it from Hujayn bin al-Muthanna and Abu Sa'id, they from Isra'il.