You must leave Denmark if you do not have, or no longer have, legal residence in the country.
Here you can read more about the legal decisions that form the basis of orders stipulating that foreign nationals without legal residence must leave Denmark and the role of the Danish Return Agency.
You have received a final decision determining that your residence permit is not to be extended or is to be revoked, and that you must leave Denmark
You have received a final decision upon the lapsing or termination of your residence permit determining that you must leave Denmark
You have received a final refusal of asylum and must leave Denmark
You are a national of the EU/EEA, Switzerland or a Nordic country and have been expelled by an administrative decision or by judgment and must leave Denmark
You have been expelled from Denmark by an administrative decision and must leave Denmark
You have been expelled from Denmark by judgment and must leave the country
You are required to leave Denmark in accordance with the rules under the Dublin Regulation