Hawaii, Puerto Rico and the USVI
TSA’s entry: “Passengers flying from Hawaii, Puerto Rico, or the U.S. Virgin Islands to the U.S. mainland cannot take most fresh fruits and vegetables due to the risk of spreading invasive plant pests.”
At the checkpoint
Whole fruit is solid food. TSA’s Thanksgiving notice for Denver listed raw potatoes, yams, greens, apples, cranberries and citrus as fine in a carry-on.
Canned fruit packed in juice or syrup is the exception. The same notice puts it in your checked bag when it’s over 3.4 ounces.
Flying home from abroad
TSA’s answer covers screening at US airports. On the way home you go through the other airport’s screening first, and its rules are the ones that count there.
Coming home through US customs
CBP’s own example is the apple you bought at a foreign airport and didn’t eat. Whether it gets in “depends on where you got it and where you are going after you arrive in the United States.” CBP’s advice is that it’s best not to bring fresh fruit or vegetables at all.
If you finish it before you land, there’s nothing to declare.
Declare it either way. USDA says declared food brings no penalty, even when it’s refused. What happens if you don’t.
TSA puts this on every entry: “The final decision rests with the TSA officer on whether an item is allowed through the checkpoint.”