The exercise ended just before 7am on Thursday.
At about 8pm on Wednesday, the government cordoned off Block A of Tung Lo Court on Tai Po Road, and the Luxe Manor Hotel on Kimberley Road.
The buildings were linked to two people: a construction worker who tested preliminary positive and had no recent travel history, and a local student.
The latter is a close contact of a Macau family of four that has contracted the highly-infectious delta variant. So far, the student’s tests have come back negative.
The government also issued compulsory testing notices for 22 locations. They included two construction sites in Wan Chai, a Fairwood restaurant in Shek Kip Mei and another in Wan Chai, a Wellcome supermarket on Nathan Road in Jordan, and Immigration Tower.
The Immigration Department later said it would suspend visa operations on the seventh floor of the tower on Thursday, while disinfection takes place. It said services will resume on Friday.