The issue is freighted with sensitivities about the United States’ commitment to Afghan security. American commanders do not want to give the Taliban any sense they are already giving up on the fight.

Officials admit that imagery is also a factor. Even as they make decisions about what to pack up, what to leave behind for Afghan forces, or what to abandon or destroy, they want to avoid any echo of the Soviets’ headlong rush out of Afghanistan in the late 1980s, which left the countryside strewed with rusting tanks and guns.

In any case, though, troops are already departing, and military planners are carefully calculating how to extricate the equipment smoothly. In all, officials estimate, they will have to wrangle 100,000 shipping containers of material and 45,000 to 50,000 vehicles like tanks and Humvees from all across Afghanistan.

That is all complicated by the greater expense, and security risk, of shipping things out of Afghanistan, given that fighting is still expected even as the withdrawal takes place.

Image Excess material is carefully sorted at Camp Leatherneck. Credit... The New York Times

Col. Jeff Hooks, the senior Marine logistics officer in southwest Afghanistan, said budgetary concerns demanded that the Marines take as much functional equipment back with them as possible. “We have a very, very detailed plan,” he said, slapping a three-inch-thick white binder on his desk called the “Reset Playbook.”

He noted that the Marines’ Afghan withdrawal would be more complicated than their Iraq pullout, even though they had collected less equipment in Afghanistan. The extra difficulty comes largely because of Afghanistan’s special geography: In Iraq, supply routes ran south to Kuwait and the Persian Gulf, but Afghanistan is a landlocked country, and the nearest port — Karachi, in Pakistan — is 600 miles away.