Sure, you can safely delete logs therein by doing the following:
rm -rf apache2/*
You could additionally write a cron script that will remove files older than (x) amount of days with something such as the following.
 Create a bash script to place in
/usr/local/bin. We'll call it
Within this file, enter the contents:
find /var/log/apache2/* -mtime +3 -type f -delete
This will remove files in that directory that are older than 3 days
Now make the script executable with:
chmod +x /usr/local/bin/apachelog_clean
 Now setup your cron to fire this script on a schedule of your choosing.
Within your crontab enter the following cron job:
0 10 * * * /usr/local/bin/apachelog_clean
This will run the script daily at 10AM server time.
Note: You may have to issue a restart to apache to get your logs rotating once more. Do so with
service apache2 restart
By default Ubuntu uses logrotate Take a look at your
/etc/logrotate.d/apache2 file with
nano /etc/logrotate.d/apache2 , you'll probably find that is has a line like the following:
This means it will keep 14 copies of your rotated log files. Change this number to the number you want to keep.