I NOT recommend to use rm -rf /va/log/*
As it also deletes and all directories. Some daemon’s configs depending on these directories, so it is a big risk to get some services not working. And big chance to get brick.
For example one of them:
vyos@r6-roll:~$ sudo rm -rf /var/log/*
vyos@r6-roll:~$ sudo systemctl start nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
vyos@r6-roll:~$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-05-26 19:49:45 EEST; 15s ago
Docs: man:nginx(8)
Process: 1866 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
May 26 19:49:45 r6-roll systemd[1]: Starting A high performance web server and a reverse proxy server...
May 26 19:49:45 r6-roll nginx[1866]: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
May 26 19:49:45 r6-roll nginx[1866]: 2021/05/26 19:49:45 [emerg] 1866#1866: open() "/var/log/nginx/access.log" failed (2: No such file or directory)
May 26 19:49:45 r6-roll nginx[1866]: nginx: configuration file /etc/nginx/nginx.conf test failed
May 26 19:49:45 r6-roll systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
May 26 19:49:45 r6-roll systemd[1]: nginx.service: Failed with result 'exit-code'.
May 26 19:49:45 r6-roll systemd[1]: Failed to start A high performance web server and a reverse proxy server.
vyos@r6-roll:~$