The "general amnesty" is the latest in a line of such decrees, including one in 2014 that saw thousands released.
Sunday's decree also promised to reduce sentences of some detainees, AFP reported.
It would include freeing some prisoners detained under the 2012 terrorism law". Those imprisoned under the 2012 law over "conspiracy" or failing to inform the authorities of an act of "terrorism" are to be released, according to the decree.
But the amnesty does not extend to those condemned over killing someone or rendering them paralyzed.