All good things come to an end, and let's face it, not everyone wants to stay here forever, but before you leave Germany you really should unregister (Abmedlung) yourself as a resident.
I know of lots of people who did not do this and then ended up with all kinds of problems regarding insurance and pension contributions. In addition should you wish to come back in the future it can be quite stressful.