delete error log apache2 code example Example: clear error log apache2 $ sudo truncate -s 0 /path/to/log.log