Hi Mike. Everyone here seems to be confused about what I
talked about in my original post.
The issue I raised about Keith's approach has nothing to do
with whether deleting xdata is or isn't appropriate.
It has to do with his method of doing it, which doesn't do
what some may think it does.
To demonstrate, draw a circle with the current color set to
'BYLAYER', and the current layer's color set to 7 (the default).
Next set the current color in the editor to red, or something
other than BYLAYER, and then do this:
(setq circle (entget (entlast)))
Move the circle just drawn a bit so the 'copy' is not coincident
with it, and then do this:
(entmake circle)
What color is the original circle, and what
color is the 'copy' of the circle created with
(entmake) ?
That's what I meant by "entmake and entget do not
have compatible argument/result lists".

I have mixed feelings about removing xdata, since there are equally valid reasons for protecting it as well as removing it. To wit, many of the programs I've written rely on the presence of xdata, be it placed and managed by my applications or third parties like Autoplant.
On the other hand, I've had clients specifically have me write lobotomy type applications -- to purge all xdata, dictionaries et al in order to sanitize 'intelligent' drawings for other purposes.
In either case I'd be very careful when shaking off xdata by deleting and recreating entities unless I fully appreciated all the ramifications of doing so, especially all the different means by which entity / object relationships exist, and subsequently can be broken.
Does Keith? In that I've no doubt.
Should the general viewing audience be warned? ABSOLUTELY.
So, if one knows what they're doing, this non destructive (in terms of retaining the original entity) may be of interest:
(defun _RemoveXdata ( ename appidlist / xdata )
;;========================================================
;;
;; Caller's responsibility to ensure valid entity
;; passed to function (including editable state)
;;
;;--------------------------------------------------------
;;
;; Remove all xdata:
;;
;; (_RemoveXdata ename '("*"))
;;
;; Remove specific xdata, form 1:
;;
;; (_RemoveXdata ename '("appid1,appid2"))
;;
;; Remove specific xdata, form 2:
;;
;; (_RemoveXdata ename '("appid1" "appid2"))
;;
;; Remove wildcarded xdata:
;;
;; (_RemoveXdata ename '("appid*"))
;;
;;========================================================
(if (setq xdata (cdr (assoc -3 (entget ename appidlist))))
(entmod
(append
(entget ename)
(list
(cons -3
(mapcar
'(lambda (x) (list (car x)))
xdata
)
)
)
)
)
)
)