A previous version of this story incorrectly stated that Ally Financial still owes the U.S. government $8.1 billion from its bailout. The figure is $4 billion. 

General Motors Company (NYSE:GM) made two big announcements Thursday: one, it sold its stake in Peugeot Citroen SA (EPA:UG), and two, it exited partial ownership of Ally Financial Inc. (NYSE:GOM), the bank-holding company that was once GM’s auto-lending division that was rescued the U.S. government and that is still $4 billion in the red for that rescue.

The world’s second-largest automaker announced Thursday it sold its 8.5 percent share of common equity in Ally in a deal worth about $900 million. The company said it made approximately $500 million.

Ally used to be known as GMAC Inc. and was once GM’s auto-lending division. In 2006, GM sold a majority stake to private equity firm Cerberus Capital Management, and two years later GMAC was taking taxpayer money as part of the Troubled Asset Relief Program in the wake of the subprime mortgage meltdown.

According to the latest U.S. Treasury Department data, the public has $8.1 billion in outstanding bailout funds to recover from Ally, which is now a Detroit-based bank holding company owned primarily by the U.S. government.

Regarding the Peugeot deal: GM said it sold all of its 24.8 million shares of PSA, a 7 percent stake, for an undisclosed sum. In March 2012, GM invested in its alliance partner, which has been reeling under the European economic slump and cutting capacity. 

“Our equity stake was planned to support PSA in their efforts to raise capital at the time of the creation of the GM and PSA alliance, and that support is no longer needed,” GM Vice Chairman Steve Girsky said in announcing the deal.

At the same time, PSA, Europe’s second-largest car company, announced Thursday in Paris that it’s writing down $1.52 billion worth of losses on its global business while negotiating to extend its partnership with China’s Dongfeng Motor Corp., according to Reuters.

PSA already has three factories it operates with Dongfeng. Its plans for those three factories plans to build 750,000 vehicles by the end of 2015. PSA’s partnership with GM was a move to lower costs in Europe’s battered auto market.