Create the following report and then review the results for accuracy:
SELECT vc.Guid FROM vComputer vc WHERE vc.IsManaged=0
Tweak as necessary so you're deleting the right records, then grab DeleteItems.cs from this article/download:
https://www-secure.symantec.com/connect/downloads/bulk-delete-resources
Edit DeleteItems.cs and update this line:
static public string sql = @"select Guid from vSiteResource";
To this:
static public string sql = @"select Guid from vComputer where vc.IsManaged=0";
Then run NScript DeleteItems.cs as described. NScript is at <drive>:\Program Files\Altiris\Notification Server\Bin\NScript.exe.
Ensure Active Directory import is disabled--I'm not sure where these unwanted 5,000 records came from--and then use Network Discovery on the IP ranges you defined, working first with a test range and then expanding to include all ranges.
Does this answer your question?