An empty rental is still a licensed rental
Chapter 167 gives inspectors the right to enter unoccupied rental units at any reasonable hour on 24 hours' notice to the owner or manager, and it makes every unit subject to biennial inspection whether occupied or not. A unit not licensed within 30 days must remain vacant until the owner complies. If the house used to be rented, call the town before you sign a contract and ask what is on file. The town's rental chapter also says the Town Manager has the powers set out in the housing standards chapter, including ordering a property vacated for imminent danger, which is another reason to repair or sell an empty house before it deteriorates.
