During what was only G.M. ' s second appearance in bankruptcy court since filing for Chapter 11 on June 1 , the carmaker won approval from a federal judge in Manhattan to terminate the leases of the jets , as well as that of a hangar at Detroit 's Metropolitan Wayne County Airport that the company has held since 1984 .