"The only reason for my decision is that my wife is suffering from depression and, for me, family is the most important thing," the defender, 28, told UEFA's website.
"I had a very good contract, but I can't be 100 percent concentrated on football and I wouldn't allow myself to get paid for mediocre performances.
"The club understood my situation and therefore we reached this decision.
Europa League
Arsenal through to Europa League last eight despite limp second-leg defeat
18/03/2021 AT 17:05
"I know I had the quality to succeed at Olympiacos, but sometimes problems crop up in our lives which take things in a different direction.
"Now I am returning to France to be near my family."
The Morocco international only joined from French club Rennes in the summer, on a contract that ran until 2010.
Europa League
Aubameyang faces a test of his mettle in Arsenal's blockbuster season finale
17/03/2021 AT 16:00
Europa League
Arsenal 'have to stop making errors costing goals' - Arteta
11/03/2021 AT 22:38