From The Daily Telegraph.
Could Brexit see expats deported by EU members?
Almost certainly not. First, there are numerous political reasons for EU states not to do such a thing, including the treatment of their own, numerous, nationals living in the UK. Mass expulsions of citizens from another developed economy would also startle foreign investors and potentially cause economic turmoil in the expelling country.
Expats would also enjoy significant legal protections that would apply after Brexit. Many lawyers argue that British expats living elsewhere in the EU at the time of Brexit would have individual "acquired rights" under international law.
This is based on the Vienna Convention of 1969, which says that the termination of a treaty "does not affect any right, obligation or legal situation of the parties created through the execution of the treaty prior to its termination.” The House of Commons Library says that "withdrawing from a treaty releases the parties from any future obligations to each other, but does not affect any rights or obligations acquired under it before withdrawal."
In other words, Brits who have already exercised their right to live in EU states would keep that right after Brexit.
One important point though: this only applies to people who have started expat life in the EU before Brexit.
After Britain had left, Brits’ ability to live and work in EU nations would depend on new agreements the UK negotiated with those nations.