It will not normally be necessary to remove Set headers once they have been added by MAKESET, but if you find you have added them in error, you can erase them using the CCDEDIT task, as follows:
The FIXWCS parameter determines whether any existing Set alignment coordinate systems (ones with Domain CCD_SET) should be erased also. It normally doesn't matter much whether this is erased or not, since without a valid Set header it is ignored anyway.% ccdedit in='*' mode=erase name=set fixwcs=yes
If you just want to remove the Set alignment frame, you can remove this attached coordinate frame directly using WCSEDIT:
% wcsedit in='*' mode=remove frame=ccd_set
Both of these commands will erase the information in question if it exists, and note the fact with a non-fatal error if it does not.
If you try to add a new Set header to
an image which already has one using MAKESET,
or a new CCD_SET coordinate system to an image which already has one
using MAKESET or some other method,
a warning will be issued, but
the old one will be overwritten.