Upvote:2
You can return to your home country which issued your passport at any time, up to the date of expiration of your passport. It does not need to be valid for any amount of time after your arrival in your home country.
Remember, when you renew your passport, if you have valid visas in your old passport, ask for it to be returned so that you can continue to use those visas.
Upvote:4
There are no exit formalities in the US.
You can safely travel, and renew your passport while in Pakistan. Your passport is valid until midnight of the date of expiry.
If you have any valid visas on your old passport, it will be returned to you along with your new passport; the old passport is no longer valid for travel - but will only be used to show any endors*m*nts (visas or other stamps) to immigration authorities.
You should make sure you ask for expedited passport renewal (it takes around a week) vs the normal month or so.
Here are the requirements:
The fee depends on how long and how many pages you want on your passport; and it is deposited at a bank:
For 5 year validity:
For 10 year validity:
You can find the location of nearest office for passports online.