It is far too late for gracefulness.
If we are not going to completely take over and own (just short of annex into statehood) a nation; then we
shouldn't a.) start a war, b.) invade, then sit down on our asses, c.) spend billions to rebuild the infrastructure,
d.) pull out troops piecemeal.
The only way for success in such endeavors is
Go in, do the job and GTFO (ie; Pakistan -Bin Laden, Grenada - students, Panama - Noriega) or
Go in, defeat the opposing nations army, acquire the nation as a US territory, rebuild it like WE want it, then; if we feel like it, grant it independence and GTFO. (ie; Germany, Japan)
As far as Iraq and Afghanistan, IMHO the only thing to do is pack up and leave; everyone and everything immediately.
All we are accomplishing currently is getting good Americans killed and or disfigured for absolutely no real reason; with the
effect of turning nearly everyone against us more than they already were.