The $40 billion palm oil industry is notorious for wiping out rainforests, displacing indigenous peoples, spewing carbon into the atmosphere and driving the orangutan and other animals toward extinction. But consumers who want to avoid palm oil have an almost impossible task because it’s in everything from ice cream to instant ramen, toothpaste to lipstick. And it’s increasingly apparent that even if they could boycott the stuff, that might not be so wise: As destructive as the oil palm is to the environment, it may be better than the alternatives. No other crop can yield even a third as much oil per acre planted. And along with using less land, the oil palm gobbles up significantly fewer pesticides and chemical fertilizers than coconut, corn or any other vegetable oil source.

Palm oil’s big problem has always been the jungle-covered terrain where the tree is grown. It’s native to Africa, but Malaysia and Indonesia now produce 85 percent of the world’s supply. Clearing land for plantations involves burning rainforest—in the process, endangering rare species and, on peatland, releasing 100 times the greenhouse gas of conventional forest fires. And demand is growing: By 2022, the global market is expected to more than double in value to $88 billion.

Environmental groups have pushed for change. Under pressure from Greenpeace the world’s largest palm oil trader, Wilmar International, signed a 100 percent zero-deforestation agreement in 2013. Public outcry also moved the European Union to change its labeling laws in 2014, making it easier to spot palm oil on ingredient lists. (The U.S. has required labeling of specific oils since 1976.) Concerned buyers can also look for a seal of approval from the Roundtable on Sustainable Palm Oil (RSPO). Some critics argue that the RSPO, founded in 2004 by industry leaders, doesn’t go far enough: Its standards forbid deforestation only in “high conservation value areas,” a term that has no legal definition. And a trader who earns an RSPO certificate can go on to mix “clean” and uncertified oil. What’s more, the world’s largest palm oil markets are in India, China and Indonesia, where most consumers—who use it for cooking—may not even be aware of such options.

Still, more big food companies are getting the message. On its 2015 sustainable palm oil scorecard, the Union of Concerned Scientists gave high ratings to such companies as Gerber, Kellogg’s, Unilever, General Mills, PepsiCo, Dunkin’ Donuts and Safeway. Environmental NGOs ultimately hope to see oil palm growers planting on already-deforested land. In the meantime, they warn against boycotting palm oil altogether. “That would mean shifting problems onto another commodity,” says Katie McCoy, the head of forest programs at CDP (formerly the Carbon Disclosure Project). Moreover, from a health perspective, palm oil is the ideal substitute for partially hydrogenated oils, the “trans fats” that food processors love and health experts hate. Palm oil is semisolid at room temperature and can stay stable for long periods without going rancid. Sustainable palm oil may be elusive, but it’s possible—and, in fact, it may even be necessary for the planet’s healthy future.