Megila 3:2
R’ Meir says you cannot sell a shul even though it will be still used as a
shul except if there is a condition that if they want it back they can take it.
The Chachamim say you can sell a shul to even a private person as long as it is
not used for a bath house, tannery, Mikva or a washing clothes water hole. R’
Yehuda says you can sell shul for a courtyard and the buyer can do whatever he
wants with it.
Megila 3:3
R’ Yehuda says a shul even though it was destroyed, you cannot say a
eulogy, twist ropes, spread out traps, spread out fruits to dry on its roof or
use it as a shortcut.
If in the ruins grass grew, you shouldn’t detach it to cause grief so that
eventually they will fix the shul.