as-Safārīnī said, “Deprivation of knowledge occurs through six aspects:
1- Not asking.
2- Poor listening.
3- Bad understanding.
4- Not memorising.
5- Not disseminating it and teaching it. For the one who hoard his knowledge and does not disseminate it, Allāh afflicts him by making him forget it as an equal recompense.
6- Not acting upon it. For acting upon it obligates remembering it, reflecting upon it, giving it it’s due right and examining it. So if he is careless in acting upon it, he forgets it.
Source: Ghadhā’ al-Albāb Vol. 1, Pg. 44
Translated by @ZubayrAbbasi