1.手动删除
echo /dev/null > /var/log/syslog
2.采用journald服务 https://itlanyan.com/clear-systemd-journal-logs/
/etc/systemd/journald.conf
[Journal] #Storage=auto #Compress=yes #Seal=yes #SplitMode=uid #SyncIntervalSec=5m #RateLimitInterval=30s #RateLimitBurst=1000 SystemMaxUse=1G #SystemKeepFree= #SystemMaxFileSize= #RuntimeMaxUse= #RuntimeKeepFree= #RuntimeMaxFileSize=
sudo systemctl restart systemd-journald