I\'m using the following command to delete four largest size files in a folder:
find \"/var/www/site1/\" -maxdepth 1 -type f | xargs ls -1S | head -n 4 | xar
You are purposely terminating your program with head -n 4, which creates the broken pipe because you terminated it before the "caller" finished. Since this is expected by you, you can ignore the error by redirecting it to /dev/null which discards it:
find "/var/www/site1/" -maxdepth 1 -type f | xargs ls -1S | head -n 4
| xargs -d '\n' rm -f 2>/dev/null