Upvote:8
The US has no exit checks; one does not interact with immigration officers when leaving the US, no matter by land, sea, or air (well, technically, CBP could do random checks of departing passengers, but this is extremely rare and I have never seen it happen). In general, anyone with or without status can leave the US at any time without any issues as long as they can enter the destination country.
Technically, a carrier is allowed to board a passenger for return to the US with an expired 10-year green card (see CBP carrier information guide, page 36, "LPRβs with expired I-551βs may be boarded without penalty provided the card was issued with a 10-year expiration date."), but I am not sure how many airlines will be willing to board you for return to the US with an expired green card.
I am not sure what you mean by "I will do so at the US consulate in my home country", but you can't file I-90 abroad because the green card can only be delivered to an address in the US. Instead, if you can't get back with the expired card, you would have to file Form I-131A with the consulate for a transportation letter (which costs $575) to return to the US, and then file I-90 (which costs another $540) once you are back in the US.