Can you be denied to leave your previous home country at the airport if debts are not paid off in this country?

it won't happen if the country you owe money to is the U.S.A. Other countries have different laws and could do something wierd like that.