Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
can you delete any file in /var/log?
can you delete any file in /var/log?
debian 8 64bit main
Because unknown errors, files in /var/log occupies all free hdd space.
Can you delete any file in /var/log without repercussions?
Can you delete in /var/log?
daemon.log
kern.log
messages
syslog
ufw.log
Thank you.
Because unknown errors, files in /var/log occupies all free hdd space.
Can you delete any file in /var/log without repercussions?
Can you delete in /var/log?
daemon.log
kern.log
messages
syslog
ufw.log
Thank you.
-
- Posts: 1101
- Joined: 2016-01-07 12:25
- Has thanked: 5 times
- Been thanked: 16 times
Re: can you delete any file in /var/log?
You can delete these files, but you will lose the ability to tack past errors/events that have been logged, if the file does not exist the logging system usually (re)creates them. Considering you said "unknown errors" you might want to hold off from deleting them until you can track down the problem.
There are a few other ways you can free up some space for troubleshooting like clearing apt archives.
There are a few other ways you can free up some space for troubleshooting like clearing apt archives.
Re: can you delete any file in /var/log?
you should investigate the reason WHY these files are growing so much, and fix that.
idk if logrotate is active by default, but it can be used to put limits on log sizes.
idk if logrotate is active by default, but it can be used to put limits on log sizes.
Re: can you delete any file in /var/log?
This prompted me to check my own system:
AFAIK, I have no problems, and I certainly haven't fixed anything in years. And yet I have 13GB in logs. The largest of these are messages, syslog & user.log at over 3GB each.
Code: Select all
su
du -hsBK /var/log/
13345756K /var/log/
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: can you delete any file in /var/log?
look into logrotate
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Re: can you delete any file in /var/log?
As with anything you do in root, be careful. A few years back I fat-fingered a button and my computer would not boot. Nada! It took me three days to discover that I had deleted the entire /var directory. Oops
Re: can you delete any file in /var/log?
My entire Debian Jessie installation with Firefox, Kodi, Skype, Openshot, Blender .... etc. takes up 1GB of disk space. Same /var/log du command shows just over 17MB of log files. Which for me is the same every day as I reboot the exact same image every day (only /home changes).phenest wrote:This prompted me to check my own system:AFAIK, I have no problems, and I certainly haven't fixed anything in years. And yet I have 13GB in logs. The largest of these are messages, syslog & user.log at over 3GB each.Code: Select all
su du -hsBK /var/log/ 13345756K /var/log/
Customised Live-Boot installed to HDD with /home persistence.
Re: can you delete any file in /var/log?
If it's a standard Debian install you should be able to move or delete files with a .gz extension.
Re: can you delete any file in /var/log?
Thanks.
Which I have attempted unsuccessfully. I do not know when or why the free hdd space gets occupied because files in /var/log get bigger. When it happens I do not notice until a window warns about little free space available. The warning does not display before free space available is down to about 2gb. Because the free hdd space continues to shrink, the hdd free space reaches zero before you can do anything. When you turn on the computer again, the desktop gui will not start. In stead in command line I have to rm some files in /var/log. Useful would be a function that displays a warning if free hdd space is down to about 20gb.
I will install debian 9 64bit once ready for download. Watch if the error reoccurs. If it does then it is likely an external program I install or the network.
want to hold off from deleting them until you can track down the problem
investigate the reason WHY
Which I have attempted unsuccessfully. I do not know when or why the free hdd space gets occupied because files in /var/log get bigger. When it happens I do not notice until a window warns about little free space available. The warning does not display before free space available is down to about 2gb. Because the free hdd space continues to shrink, the hdd free space reaches zero before you can do anything. When you turn on the computer again, the desktop gui will not start. In stead in command line I have to rm some files in /var/log. Useful would be a function that displays a warning if free hdd space is down to about 20gb.
I will install debian 9 64bit once ready for download. Watch if the error reoccurs. If it does then it is likely an external program I install or the network.
Re: can you delete any file in /var/log?
Are you opening the logs and reading them?hthi wrote:Which I have attempted unsuccessfully. I do not know when or why the free hdd space gets occupied because files in /var/log get bigger.
Research the error message on the web or ask here, that's what I do in attempt to get my logs smaller.
Use whatever viewer or editor you prefer to view these:
Code: Select all
/var/log/syslog
Code: Select all
/var/log/messages
(I always use pico, so I type this into my terminal to open the logs:
Code: Select all
su
[enter my root pw -- permission denied on my user account]
pico /var/log/messages
You can also enable logrotate:
Code: Select all
cd /etc/logrotate.d
pico rotate-all.conf
Code: Select all
/var/log/* {
daily
rotate 3
size 5M
compress
delaycompress
}
Now you can force it, even if the affected logs don't meet the criteria:
Code: Select all
logrotate --force rotate-all.conf
Code: Select all
cd /var/log
ls
Code: Select all
alternatives.log.1 btmp.1 debug.1.1 fontconfig.log.1 kern.log.2.gz messages.2.gz syslog.3.gz user.log.1.1 Xorg.0.log.old.1
apt cups debug.2.gz gdm3 lastlog.1 speech-dispatcher ufw.log.1.1 user.log.2.gz Xorg.1.log.1
auth.log.1.1 daemon.log.1.1 dpkg.log.1 installer lightdm syslog.1.1 ufw.log.2.gz wtmp.1 Xorg.1.log.old.1
auth.log.2.gz daemon.log.2.gz faillog.1 kern.log.1.1 messages.1.1 syslog.2.gz.1 unattended-upgrades Xorg.0.log.1 Xorg.2.log.1
If your logs are filling up at an abnormal rate, you should inspect them and see why. Driver problems / future failure predictions can be found in them.