To run this script
Select Script → Layout → Delete_Unassociated_iNets from the Menus.
Or, in versions that support the script, you can run the utility directly from this page using this button.
This utility will delete the unassociated inet routes in the layout. The unassociated routes happen when you delete the wire in the schematic but the inet route will still remain in the layout. Run the utility and it will find the unassociated inet routes and will remove them. Below is the example of a layout before and after running the script: