How to avoid the need to issue “y” several times when removing protected file

To avoid being asked about removing files, add the -f (“force”) option:

rm -f /path/to/file