the Fatwa Department Research Committee - chaired by Sheikh `Abd al-Wahhâb al-Turayrî
When the deceased is placed into the grave, it should be treated like his or her dwelling and home. The graveyard is the abode of the deceased, so it is not permissible to violate it.
Graves are to be respected. The Prophet (peace be upon him) said: “For one to sit on a piece of coal, and for it to burn his clothes and reach his skin, is better for him than for him to sit on a grave.”
It follows that destroying a gravesite or a graveyard, which is the dwelling of the deceased, is a transgression against the inhabitants of the graveyard. However, if the destruction of the gravesite or the graveyard yields an important benefit to society and no harm is inflicted upon the living or the dead, then that destruction is permitted.
It is recorded that A’ishah, the mother of the believers, and Talhah ibn `Ubayd Allah were exhumed from their graves and buried elsewhere because their original graves were damaged. Mu’âdh bin Jabal dug up his wife’s gave and wrapped her in clean shrouds, for she had been wrapped in very old ones. [Ibn Qudâmah, al-Mughnî]
Scholars, both classical and contemporary, have ruled that it is prohibited to destroy a graveyard which contains graves of Muslims unless their bones have disintegrated and turned to dust. This can be determined either by firsthand verification or by calculating a certain number of years.
This time period varies depending on the nature of the soil, since the soil of some graveyards hastens the disintegration of bones more that of others. As for assigning a certain number of years to a graveyard such as forty years or more less, this I know nothing about.
And Allah knows best.
Source: Islam Today