seg_length = 100
ids_lists = [ids_list[x:x + seg_length] for x in range(0, len(ids_list),
    seg_length)]
for ids_list in ids_lists:
    SomeModel.objects.filter(id__in=ids_list).delete()
Delete Duplicate Rows in Django DB