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.

  • 2
    Quick answer, yes, you can delete your /var/log files but I'm wondering why is that folder so big?. Cheers, sigfried. Apr 25, 2019 at 14:34
  • Probably better than deleting: $ sudo journalctl --rotate $ sudo journalctl --vacuum-size=200M $ sudo -H emacs /etc/systemd/journald.conf (and set #SystemMaxUse=200M) Source: ubuntuhandbook.org/index.php/2020/12/…
    – stafusa
    Jun 22, 2021 at 16:38

2 Answers 2


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.

  • 1
    > logfile .... also works Apr 26, 2019 at 2:02
  • Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found
    – Nisha
    Apr 26, 2019 at 5:55
  • 1
    see askubuntu.com/questions/266429/…
    – Rinzwind
    Apr 26, 2019 at 6:55

You can empty the files by this command on the terminal

echo "" > a_log_file

Where the 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .