All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
In principle, it is not permissible to dig graves except for an Islamicly justified reason. However, if the corpse has disintegrated into dust, then it is permissible to benefit from the place of the grave in what is permissible, among which is building on it; this is the view of the majority of the scholars .
The condition for the permissibility here is that the land should not be an endowment, because if it is an endowment, then it is only permissible to benefit from it according to the condition set by the person who donated it as an endowment.
However, if there are some remains of the dead, like bones and the like, then it is not permissible to dig their graves to build on it and the like, unless there is a preponderant benefit, like expanding a mosque, or a road and the like.