Is it possible to have 64.5GB log files in Ubuntu? Can I delete those files? My laptop is dual booted and the Ubuntu partition is only 100GB.
Can I delete those files ?
Yes, but do not. EMPTY them instead of deleting. Deleting files from /var/log/ requires the file to be unused and most log files are open. In theory deleting the file might crash the service that uses this log. Not a big issue unless you are hosting something that can not have downtime.
You can empty it with:
echo "" > logfile
Another note: please do not empty them without at least examining why these exists. Those logs will return and return and return. Fixing the issue that is being logged will keep those logs small.
You can empty the files by this command on the terminal
echo "" > a_log_file
a_log_file is file of the big files in
/var/log. But you can get more space on your system by those commands:
sudo apt autoremove
this command help you remove unused packages/dependencies for your apps and system. And this command:
sudo apt autoclean
which autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control. The configuration option
APT::Clean-Installed will prevent installed packages from being erased if it is set to off.