If one forgets some part of the quran after memorizig it, and then repents, would one have to revise the forgotten part for the repentance to be valid? If it has to be revised, then the surahs or rukoos learned properly can be easily revised, but how can one revise ayat learned from random locations, when one does not remember those locations? Would this revision have to be done immediately, or can one take one’s time in doing it (i.e. doing it in spare time)?

Praise
be to Allah

Firstly: 

Undoubtedly studying the Qur’an, reciting it and memorising
it are among the best of righteous deeds. The Prophet (blessings and peace
of Allah be upon him) encouraged us to read Qur’an regularly lest we forget
it, which means constantly reviewing what one has memorised and repeatedly
reciting it. 

Similarly, forgetting Qur’an is a blameworthy action, because
it involves falling short, turning away from the Book of Allah and
abandoning it. 

See the answer to question no. 3704

Secondly: 

The scholars differed concerning the ruling on forgetting
Qur’an: 

It was said that forgetting Qur’an is a major sin. 

It was said that it is an act of disobedience and sin, but it
does not reach the level of major sins. 

It was said that it is a calamity that befalls a person and
affects his religious commitment, or it may be a punishment from Allah for
some of his deeds, even if it is not in and of itself a major sin or minor
sin. This is the view that is most likely to be correct concerning this
issue.

However it is not appropriate for the one who has memorised
it to neglect his recitation or to be careless about reviewing it. Rather he
should adopt the practice of reciting a daily portion in order to help him
to remember it and prevent himself from forgetting it, in the hope of reward
and of benefitting from its rulings. 

See the answer to question no. 127485 

Thirdly: 

Forgetting some of the Qur’an is a result of neglecting it,
and some kinds of neglect are less serious than others, as Ibn al-Qayyim
(may Allah have mercy on him) said in al-Fawaa’id (p. 82). But
forgetting it because of turning away from it and being distracted by other
things is undoubtedly a calamity that may lead to further calamities, in
addition to the loss of reward. 

What is advised for one who memorised some of the Qur’an then
forgot it is the following: 

·       
He should revise the soorahs
that he had memorised until he has memorised them properly once again.

·       
He should keep up with
review in a regular fashion, so that he will not forget it again.

·       
He should carry on
memorising and reviewing under a well-versed shaykh.

·       
He should review what he had
memorised of large portions such as a juz’ or a hizb and the like, and
strive hard to memorise an entire soorah, so that reviewing what he had
previously memorised and has memorised again will help him to complete
memorisation of the soorah.

·       
As for reviewing small
portions that he had memorised then forgotten, such as two or three verses
and the like, he should not focus on that and should not go to the trouble
of remembering what he had forgotten of them. 

He should focus on re-memorising what he had forgotten of
soorahs and large portions, as mentioned above, and there is no sin on him
for not re-memorising those small portions, some of which he may have
forgotten. He should examine his own situation, and whatever is a sin he
should ask Allah to forgive him and repent from it; whatever is a
shortcoming, he should amend it; and whatever was a case of turning away
from matters of the hereafter and focusing on worldly matters, then he
should refocus on the hereafter, for it is better and longer lasting. 

Moreover, it is better to put his efforts into reviewing what
he has memorised of the Qur’an immediately, when he is still motivated and
before he loses motivation and starts to procrastinate. Ibn al-Mubaarak
narrated in az-Zuhd (1/469) that Ibn Mas‘ood (may Allah be pleased
with him) said: These hearts sometimes have drive and focus and sometimes
they slow down and become distracted, so make the most of the times when
they have drive and focus, and let them be when they slow down and are
distracted. 

Undoubtedly the fact that one who has forgotten Qur’an feels
that he has fallen short and is asking how to restore it comes under the
heading of having drive and focus after having slowed down and been
distracted. One who is in this situation should start re-memorizing it
immediately, and should not delay doing so. 

If he is not able to revise it except during his free time,
because he is very busy, has a lot of work and is striving to earn a living
for his dependents, and the like, then there is no blame on him. 

For more information, please see the answer to question no.
161367

And Allah knows best.