SD Card remove() doesn't work

I am trying to delete a file from the SD card and when I try to compile I get the following error:

In function 'void setup()':
pid_sketch_with_encoder_2Motors:123:14: error: 'class SDLib::File' has no member named 'remove'
myFile.remove("M1.txt");
^~~~~~
pid_sketch_with_encoder_2Motors:137:12: error: 'class SDLib::File' has no member named 'remove'
myFile.remove("M2.txt");
^~~~~~
exit status 1
'class SDLib::File' has no member named 'remove'

I am using the libraries that came with Arduino IDE and read/write/create work but remove doesn't. What gives?

I am attaching the sketch instead of using the </> because my message is exceeding 9000 characters. I apologize for any inconvenience because of it.

pid_sketch_with_encoder_2Motors.ino (10.6 KB)

One more thing -- I commented the lines with "remove" function in order to compile and use it and I forgot to uncomment them before posting.

SD.remove(fileName);

Juraj:
SD.remove(fileName);
SD - Arduino Reference

That is exactly how my code reads. The syntax is correct.

cosmicone:
That is exactly how my code reads. The syntax is correct.

SD not File

Juraj:
SD not File

Thank you so much. That worked!