{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":25981,"path":"it-asset-management/software-asset-management/delete-disco-entries-sam.md","title":"Delete uninstalled software from the Software Installation table","bundle":null,"doc_type":null,"release":"australia","body":"\n# Delete uninstalled software from the Software Installation table\n\nDelete installations from the Software Installation \\[cmdb\\_sam\\_sw\\_install\\] table if those software installations are also uninstalled from a CI.\n\n## Before you begin\n\nAfter the discovery process runs and you identify software installations that are uninstalled from a CI, delete those installations from the Software Installation \\[cmdb\\_sam\\_sw\\_install\\] table in the CMDB application.\n\nCreate a script to delete multiple software installation records from the Software Installation \\[cmdb\\_sam\\_sw\\_install\\] table. You can use the Table API to query the Software Installation table to get the installation list for the CI.\n\nRole required: sam\\_developer\n\n## About this task\n\nYou can also delete software installation records for specific publishers like Oracle, VMware, and Citrix.\n\n## Procedure\n\n1.  Use the REST Table API api/now/table/cmdb\\_sam\\_sw\\_install?sysparm\\_query=installed\\_on%3D28c9c3b8c0a8000b009b2d941d7e3ee9 to query and identify the list of software installs on a specific CI.\n\n    For more information on the REST endpoint API, see [Table API-GET](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/c_TableAPI.md).\n\n    1.  Specify the table name, Software Installation \\[cmdb\\_sam\\_sw\\_install\\] table, and query parameters.\n\n        For the query parameters, specify either the sys\\_id of the CI or a list of fields that are separated by commas such as publisher, version, and product on which you want to perform the delete operation.\n\n    2.  After entering the query parameters, send the request.\n\n        You get a response in a JSON format listing of all the software installations for that specific CI. You can view the sys\\_id for all the software installations in the response.\n\n2.  Based on the response, identify the sys\\_ids of the software installations that are deleted on a CI.\n\n    Only the sys\\_ids of those software installations must be passed through the Delete API.\n\n3.  Use the Delete API request.setEndpoint\\('http://xyz/api/now/table/cmdb\\_sam\\_sw\\_install/728e87dafd841010fa9bea491bfdc1ff'\\); request.setHttpMethod\\('DELETE'\\); to delete the software installs from the Software Installation \\[cmdb\\_sam\\_sw\\_install\\] table.\n\n    xyz in the URL refers to your ServiceNow instance.\n\n    1.  Specify the table name, Software Installation \\[cmdb\\_sam\\_sw\\_install\\] table, and the sys\\_ids of the software installations that are deleted on the CIs.\n\n    2.  Send the request.\n\n        The software installations are deleted from the Software Installation \\[cmdb\\_sam\\_sw\\_install\\] table.\n\n\n**Parent Topic:**[Software Asset Management administration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-asset-management/software-asset-management/c_SAMAdministration.md)\n\n"}}