The constant use of the word them in your statement is telling.
99% of these people have done nothing but flee a war.
Mass exportation won't solve anything a lot of these acts have been committed by French and German nationals who've been in the country since birth.
There isn't one solution for stopping such attacks but a cohesive approach of greater policing, joined up intelligence, education, protection of refugees and protection of nationals.