Note that you should always be extra careful, since sometime information that is not obvious must be removed to make the DICOM data de-identified.
One may think that removing patient name and birth date is sufficient, but in reality the process is a lot a lot more complex. Because of this, it is usually a good idea to rely on established and verified tools, like the ones mentioned by @pieper.
If you only care about the image pixel content, you can save the image into a non-DICOM format, which will discard all of the patient-specific metadata. Unless your image has burned-in annotations (and unless you worry about patient’s face or other image features that can uniquely identify the subject), this might be sufficient.