Abstract Habitat loss is considered a major threat for biodiversity. However, the scales on which its effects occur are still insufficiently understood, namely, is the amount of available habitat important for species richness on both local and landscape scales? We studied the effects of local and landscape‐scale habitat amount on local‐scale species density of deadwood‐dependent lichens in Swedish boreal forests. Creation and retention of deadwood are common practices to benefit forest biodiversity, and recognizing the relevant scale is critical for them to be successful. We surveyed deadwood‐dependent lichens in 90 unmanaged forest stands that differed in the local and landscape habitat amount. The local habitat amount was measured as the amount of deadwood in the sampled stands (m2 deadwood ha−1), while six alternative proxies were used to estimate the landscape habitat amount, that is, the amount of deadwood in the surrounding landscapes. Lichen species density (number of species per standardized deadwood area of 3.7 m2) was modelled as a function of local and landscape habitat amount at multiple scales (300 m–5 km from the stands). Lichen species density increased with the landscape habitat amount. The proportion of old forests (>100 years, including newly clear‐cut stands that until recently were old forests) within 5 km from the stands explained species density better than the other proxies of landscape habitat amount. Local deadwood amount did not affect species density, and there was no interaction between the local and landscape habitat amount. Synthesis and applications: To promote the conservation of deadwood‐dependent lichens, the amount of old forests in managed forest landscapes should be maintained or increased. A certain amount of deadwood hosted more lichen species when situated in a landscape with more old forest, while there was no effect of the local deadwood amount. This suggests that management aimed at increasing the local species density of deadwood‐dwelling lichens should focus on creating and maintaining habitat in the surrounding landscape rather than only adding deadwood to that local site. In other words, effective management for deadwood‐dependent lichen diversity requires landscape‐scale habitat protection.