Sure they can. Look how efficiently Germany did it.
I really hope I'm not proven wrong, but something of that scale is nearly impossible to pull off in optics with the amount of recording we can do now. The equivalent in America is about 40m Americans being "deported". That's the entire Californian population and then some.