--- title: "Domain Management - Tidy Domain function" slug: "domain-management-tidy-domain-function" tags: ["GateManager", "9.2"] updated: 2021-11-23T13:00:13Z published: 2021-11-23T13:00:13Z canonical: "kb.secomea.com/domain-management-tidy-domain-function" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.secomea.com/llms.txt > Use this file to discover all available pages before exploring further. # Domain Management - Tidy Domain function **This guide explains how to use the "Tidy Domain" function.** This function is only usable by Basic administrators, Domain administrators, or Server administrators (also usable by the special "distributor administrator") Note: Requires GateManager version 9.2B or higher. The "Tidy Domain" function can be used to quickly clean up various things in a domain folder.For example, old disabled accounts, inactive accounts, alerts, appliances, and other such things. A "Tidy" operation is performed in three steps. 1. Select items that match certain criteria. 2. Select items to then delete/move. 3. Perform the tidying. To use the "Tidy Domain" function. - First, click the domain folder you want to clean. ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/image-1617004676802.png) - Then, click the "Domain Management" tab on the right side, so that it folds out (note you may not see the Export / Import domain buttons depending on your user type) ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/image-1617004683382.png) - Click the "Tidy Domain" button and you will see the following options - note you can click the "Lightbulb" for more information on how the function works. ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/image-1617004691096.png) - The options do the following: - Recurse Subdomains. - Makes it so all subdomains are also cleaned. - Includes customer domains (distributor only option). - Means customer folders are also cleaned. - Tidy Domains. - Removes all empty domain folders. - Tidy Messages. - Removes messages that are either Disabled and/or have expired. - Tidy Reports. - Removes reports that are disabled. - Tidy Accounts. - Removes accounts that are disabled and/or inactive for X months. - Tidy Appliances. - Removes Appliance (i.e SiteManagers, Trustgates, etc.) that are disabled and/or inactive for X Months. - Tidy Agents. - Removes agents that are disabled and/or agents that have been inactive for X months. - Tidy Licences. - Removes Empty licence pools and/or invalid imported licenses. - Tidy Alerts. - Removes alerts that are either disabled and/or are unused (i.e has nothing selected). - Tidy Actions. - Removes all actions that are disabled and/or completed (i.e. has nothing pending). - Flatten domain. - Distributor or Server Administrator only option. - Move all items found into the domain folder that you choose to "Tidy", meaning all subdomains content, etc. are moved. - Once you have selected what you want to tidy, click "Continue". ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/image-1617004711987.png) - Now you will get an overview of all the items found; by default, everything is selected to be removed, but you can "uncheck" items to have them stay. **Note:** you can click the lightbulbs for more information. ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/image-1617004712031.png) - Click the "green checkmark" to confirm you want to remove the selected items or the "red X" to cancel ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/image-1617004724924.png) - A window will appear that asks you to confirm. If you click "Yes" everything is removed and this operation cannot be undone. Click "No" to cancel. ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/image-1617004732029.png)