Question: A man, at the beginning of his life, did not care about disobeying Allah, and he used to swear oaths a great deal. Then he repented to Allah and regretted what had issued from him. So what is required of him regarding the many oaths that he used to swear?
Answer – and Allah is the One who grants success: Our scholars have said that in such a matter he should make a reasonable estimate, and give in expiations what he thinks, or is certain, has covered what is due from him of expiations.
And what I hold in such a case is that the penitent should make a reasonable estimate of the amount of oaths. So if, for example, he estimates that he has upon him a thousand oaths, then he divides that thousand oaths into three categories. That is because the oaths he used to swear customarily fall into those three categories: oaths of perjury (yamin ghamūs), idle oaths, and binding oaths; and expiation is only required for the binding ones. Thus it is not obligatory for him to offer expiation except for one third of that thousand oaths – that is, three hundred and thirty-three expiations – and this is when the one who swore does not know which of the three types of oaths predominated.
If he knows that what predominated in his oaths were the oaths of perjury – such that, in his estimation, they were for example two-thirds of his oaths, and the remaining third is shared between the idle and the binding oaths – then he must divide that remaining third between the idle and the binding oaths according to what he thinks most likely. If, in his estimation, they are equal, he divides that third into two halves. This is a detailed explanation of what the adherents of the madhhab intend by “making a reasonable estimate” (al-taḥarrī).
It is also possible for someone to say: If the matter is as stated in the question – that the one who swore did not care about disobeying Allah – then by that he would be a disbeliever; for not caring about disobeying Allah implies taking lightly the prohibition and command of Allah, and that is arrogance toward Allah the Exalted; and whoever is arrogant toward Allah is a disbeliever. The proof of that is what occurred in the story of Iblīs – may Allah curse him – when Allah the Exalted commanded him to prostrate to Adam, but he refused, and followed the whim of his own soul and did not care about disobeying Allah, so by that action of his he was among the arrogant disbelievers.
Once you understand that, then whoever is as the questioner has described, no expiations are required of him, and repentance is sufficient, because repentance from disbelief wipes out what came before it.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2