If you would like to leave Germany but you are already registered here and/or receiving benefits, it is necessary to deregister with the registration office. There is a specific form for this. Fill it in and send it with a copy of your ID by email to meldewesen@leipzig.de. If you receive benefits, you should also inform the relevant authority about your situation. This means, for example, that you should let the Job Centre or Social Welfare Office that you are leaving Germany.
If you are not registered and do not receive any social benefits, you only need to observe the entry regulations of your destination country.