In this week's portion, Matot, we learn that the tribes of Gad and Reuben wanted to remain on land on the east side of the Jordan, and not settle in the Promised Land. (Moses granted that, with stipulations.) We also know from Midrash Tanchuma, Beshalach 1:4 that 80% of the Israelites stayed in Egypt and died in the plague of darkness.
Was there ever a clear commandment from God that all Israelites had to settle in Eretz Yisrael?