Apple turned the leaves on its famous logo green, in honor of Earth Day. Courtesy of Apple.

It's time to finally get rid of that old iPhone. You can now recycle your Apple gear -- and maybe event get a little something back -- under a new program that Apple has just launched to commemorate Earth Day. As the Associated Press reported, Apple will recycle all their old products for free and offer some gift cards for the products that are in a condition fit for resale.

The company has long offered recycling in select Apple store locations, but now the program is rolling out to every store. Of course, users can also look to other recycling options or resell services to dispose of old gadgets, but Apple's program offers a fairly painless way to get rid of your e-junk.

The move is part of a wider Earth Day push from the firm to tout its efforts to be more green -- a philosophy it encapsulated with a short film  about its sustainability efforts released on Monday. The video, which came with a narration by none other than Apple chief executive Tim Cook, also discussed the company's broader goal of making everything "better."

There's little doubt that Apple has improved its reputation on environmental issues and sustainability since Cook took over the company in 2011 after the death of co-founder Steve Jobs. Under Cook, the company has made efforts to have its stores, data centers and corporate buildings run on renewable energy. According to the Apple Web site, 73 percent of the energy for its facilities comes from renewable sources.

Cook also hired Lisa Jackson, former administrator of the Environmental Protection Agency, to be its vice president of environmental initiatives.

Those efforts -- particularly the move to get Apple data centers running on renewable energy -- have at least partially changed the mind of Greenpeace, formerly one of the company's fiercest critics. In its latest report, the environmental group said that Apple and Facebook are among the Internet companies doing the most to promote a clean cloud. Apple, the report said, "has helped set a new bar for the industry."

Still, Apple acknowledged that it has more room for improvement on green issues. For example, the firm reported that it produced a carbon footprint of  33.8 million metric tons of greenhouse gas emissions in 2013, the bulk of which comes from its manufacturing process. In fact, the company's own study found that its carbon emissions went up nine percent after reevaluating how it measured emissions from its aluminum use alone.

"We’re committed to reducing our greenhouse gas emissions and will continue using our life cycle analysis to drive that change," the firm said in a statement on its Web site.

While most of the green evangelism coming from Cupertino this week is pretty feel-good, there is one element of it that definitely has an edge. Apple also took an Earth Day opportunity to call out its top competitor, Samsung.

The two rivals are embroiled in the latest round of an intellectual property legal brawl in which both companies have accused each other of copying proprietary designs and infringing on company patents. In full-page newspaper ads that appeared across the country, Apple challenged Samsung to make some green improvements of its own.

Or, as Apple put it: "There are some ideas we want every company to copy."