If you want to emigrate, you must deregister your residence in Germany.