When you’re tired, cranky and stuck in the middle seat, something as small as a delicious apple has the power to turn your mood around. Eating fruits or vegetables during a flight is a simple way to keep your energy up and resist the temptation to gorge on unhealthy airport food. Packing produce, even in larger quantities, generally isn’t a problem for the TSA or the airport security – but it might be an issue with your destination’s local government, depending on where you’re going.

The TSA’s Stance on Fruits and Vegetables

In general, the Transportation Security Administration (TSA) has no problem with you packing your own food items like fresh or frozen fruit and vegetables in either carry-on or checked bags. As long as the items are in a solid form, as in the case of apples, baby carrots or dried fruits, the TSA doesn’t have any restrictions related to these solid foods.

However, any fruit or vegetable that is soft, mashed or in sauce form – like applesauce, jams, fruit cups in liquid, or any squeezable pouch of fruit or vegetables – is subject to the same restrictions that the TSA places on liquids, gels and aerosols. In checked luggage or checked baggage, these liquid foods are no problem and are generally allowed in any quantity. But in carry-on bags, any soft or liquid-like fruit or vegetable counts toward your total allowance of liquids, gels and aerosols. Under the TSA’s 3-1-1 rule, each traveler is allowed to pack these items in containers no larger than 3.4 ounces. Each person’s containers must fit into a single 1-quart resealable plastic bag. (An exception exists for passengers traveling with infants for baby food.)

Planning to pack frozen food, fruits, or veggies in your carry-on? Ice packs fall under the 3-1-1 rule and must follow the liquid rule of being kept in quart-sized bags unless they’re completely frozen solid.

Packing Fruits and Vegetables for Travel

Collapsible plastic food containers are perfectly suited for this purpose. Fill them with fresh fruits or vegetables and toss them in your carry-on. They’ll protect the food from bruising and crushing, and, once the food is gone, they collapse down to take up limited suitcase space.

To pack frozen produce that requires ice packs, place them together in a soft-sided cooler bag and pack the cooler bag in carry-on luggage. Aim to keep both the food and ice packs as cold as possible on the trip to the airport. To check frozen fruits or veggies, check your airline’s dry-ice policies. Generally, airlines allow passengers to check containers that hold up to 5 pounds of dry ice, provided the containers are packed and labeled appropriately.

TSA agents may ask travelers to remove all food from their carry-on luggage and place it in bins for screening, so pack food containers near the opening of a carry-on bag.

Destination-Specific Exceptions

When you’re flying in on international flight, these rules might change at the security checkpoints. To island governments that tightly control their ecosystems, your fresh fruit or vegetables present a risk. A single piece of produce could theoretically introduce a dangerous pest or disease into the local environment. That’s why Hawaii, Australia and some other destinations enforce strict rules about bringing in fruit and vegetables. Travelers headed for Australia must fill out a form declaring any fresh or frozen fruits or vegetables they’re carrying. Upon arrival, a biosecurity officer will assess the risk that the produce poses and may order that it either be thrown out or treated to reduce its risk. The person traveling with the food must pay any fees involved in treating it.

The Hawaiian government does not allow travelers to bring in certain types of produce without going through a permitting and quarantining procedure. The list of prohibited items includes coconuts, citrus fruits from Florida or Puerto Rico, and certain root vegetables. Travelers may only bring produce out of Hawaii if it’s specifically packaged for that purpose. If you pick fresh fruit or buy individual pieces from a grocery store, airport screeners won’t allow it onto the plane.

Before packing fruits and veggies for a trip to any international locale, especially island nations, check the country’s guidelines first. You don’t want to pack and transport fresh produce all that way only to have it confiscated before clearing customs. Even traveling from the continental United States or U.S. mainland to the U.S. Virgin Islands could warrant additional screening by TSA officers for different types of fruits to ensure through security screenings, like an x-ray machine, that different plant pests aren’t present in your hand luggage.