The chapter concerns solutions about the problems of managing the location information of nodes of ad hoc and wireless sensor networks (WSNs). Once nodes know about their location, solutions for location management take care of disseminating this important information to all or some of the other network nodes that need it for routing or other purposes. The chapter covers first the solutions that have been proposed for mobile ad hoc networks, where research in this area has started along geographic routing over a decade ago. We then describe solutions in the still largely uncharted territory of WSNs. In particular, we survey methods for location management that have been proposed for different application scenarios, emphasizing how location information is managed, i.e., proactively, reactively, or through dedicated nodes (location servers), which nodes move, and the different communication models adopted. Our review of the solutions currently proposed reveals that further research is needed for providing efficient location management protocols, especially for WSNs, and that the evaluation of their effectiveness for location aware applications and geographic routing is needed for truly identify new protocol design guidelines and improved network performance.