Performing automated database cleanups

Once an asset is scanned and added to the database, Lansweeper will not remove it unless instructed to do so. You can manually delete old assets or have them deleted automatically through your database cleanup options, found in the web console under Configuration\Server Options. These options can be used to delete assets as well as other stale data. There are Asset Cleanup Options, User Cleanup Options and History Cleanup Options.

Server Options menu
If enabled, most of the cleanup operations are performed when the Lansweeper Server service starts on your Lansweeper server and automatically every 24 hours afterward.
You can prevent specific assets from being affected by your cleanup options by clicking the Assets link at the top of the console, ticking the checkboxes in front of the assets, hitting the Edit Fields button on the left and ticking the Not Affected By Cleanup Options field.

Asset Cleanup Options

Below is an overview of currently available asset cleanup options.

  • Automatically make non-active assets active when they are rescanned
    This changes the state of any assets whose state is not "active" to "active" when the assets are rescanned. If this option is enabled, the asset below for instance will be set to "active" again when rescanned.
    automatically make non-active assets active when rescanned
  • Set assets to non-active if not seen in the last XX days
    This changes the state of any assets that have not been detected in your network in the last XX days to "non-active". "Non-active" assets are not deleted from your Lansweeper database, but are excluded from most reports. This setting only affects assets that have been successfully scanned at least once and that have an IP address.
  • Permanently delete assets not seen in the last XX days
    This deletes any assets that have not been detected in your network in the last XX days from your Lansweeper database. This setting only affects assets that have been successfully scanned at least once and that have an IP address. Keep in mind that this operation cannot be undone without restoring a database backup! Any historical and custom data associated with the assets is lost, even if you rescan the assets afterwards.
  • Remove computers not found in Active Directory from the Lansweeper database
    This deletes domain computers that no longer exist in Active Directory from your Lansweeper database. This operation cannot be undone without restoring a database backup! Any historical and custom data associated with the assets is lost, even if you rescan the assets afterwards.
  • Set computers to non-active if not found in Active Directory
    This changes the state of domain computers that no longer exist in Active Directory to "non-active". "Non-active" assets are not deleted from your Lansweeper database, but are excluded from most reports.
  • Remove computers disabled in Active Directory from the Lansweeper database
    This deletes domain computers that are disabled in Active Directory from your Lansweeper database. The computers are only deleted from your Lansweeper database, not from Active Directory itself. Keep in mind that this operation cannot be undone without restoring a database backup! Any historical and custom data associated with the assets is lost, even if you rescan the assets afterwards.
  • Set computers to non-active if disabled in Active Directory
    This changes the state of domain computers that are disabled in Active Directory to "non-active". "Non-active" assets are not deleted from your Lansweeper database, but are excluded from most reports.
  • Refresh Active Directory computer details (OU, description...)
    This forces a periodic update of the Active Directory details of domain computers already present in the Lansweeper database. A domain computer's AD details are also updated when the computer is rescanned, if an update did not already occur in the last 20 hours.

User Cleanup Options

Below is an overview of currently available user cleanup options.

  • Remove users not found in Active Directory from the Lansweeper database
    This deletes domain users that no longer exist in Active Directory from your Lansweeper database. This operation cannot be undone without restoring a database backup!
  • Remove users disabled in Active Directory from the Lansweeper database
    This deletes domain users that are disabled in Active Directory from your Lansweeper database. The users are only deleted from your Lansweeper database, not from Active Directory itself. Keep in mind that this operation cannot be undone without restoring a database backup!
  • Refresh Active Directory user details (department, telephone...) in the Lansweeper database
    This forces a periodic update of the Active Directory details of domain users already present in the Lansweeper database. A domain user's AD details are also updated when the user logs into a computer during a computer scan, if an update did not already occur in the last 20 hours, and when its user OU is scanned.

History Cleanup Options

Below is an overview of currently available history cleanup options.

  • Delete history from all history tables after XX days
    This deletes historical information (i.e. software and other changes) found in the History tab of Windows computer webpages.
    delete history from all history tables
  • Delete eventlog entries after XX days
    This deletes the Event Viewer entries found in the Event Log tab of Windows computer webpages. As event log data can take up a lot of space, it is recommended that you lower this setting as much as possible.
    delete eventlog entries
  • Delete serverlog entries after XX days
    This deletes the debug messages generated by the Lansweeper Server service and found in the web console under Configuration\Server Log.
    Server Log menu
  • Delete logon information after XX days
    This deletes the user logon events found in the Config\User Info\Last Logon section of Windows computer webpages.
    delete Windows computer logon information
  • Delete uptime data after XX days
    This deletes uptime calendar events found in the Uptime tab of Windows computer webpages.
    delete uptime data
  • Delete deployment logs after XX days
    This deletes the deployment logs found in the web console under Deployment\Installer Logs or Deployment\<server name>
    Installer Logs menu
  • Delete configurations logs older than XX days
    This deletes information on who made changes to assets or Lansweeper settings and when. More info on this logging feature can be found in this knowledge base article.
  • Delete Lansweeper login logs after XX days
    This deletes information on who logged into the Lansweeper web console and when. More info on this logging feature can be found in this knowledge base article.
  • Delete performance counter data after XX days
    This deletes performance information found in the Performance tab of Windows computer webpages. More info on the performance scanning feature can be found in this knowledge base article.

Related Articles