Skip to content

Clean system log on MacOS

homepage-banner

TL; DR

rm -rf ~/Library/Logs/*
rm -rf /var/log/*
rm -rf /var/logs/*

Introduction

System logs on your MacOS device are a record of everything that has happened on your system, from software installations to hardware changes. Over time, these logs can take up a lot of space on your device and may even slow down your system. In this post, we will discuss how to clean your system log on MacOS and keep your device running smoothly.

Use Terminal to clean system log on MacOS

One way to clean your system log on MacOS is through Terminal. Terminal is a built-in application that allows you to execute commands on your system. To clean your system log using Terminal, follow these steps:

  1. Open Terminal on your Mac.
  2. Type the following command and press Enter: sudo rm -rf /private/var/log/*
  3. Enter your administrator password when prompted.
  4. Press Enter again. This command will remove all the logs stored in the /private/var/log/ directory. By using sudo, you will have the necessary permissions to delete these files.

Use third-party apps to clean system log on MacOS

Another way to clean your system log on MacOS is by using third-party applications. There are several apps available on the App Store that can help you manage and clean system logs. Some of the popular ones include CleanMyMac X, CCleaner, and Onyx. These apps have user-friendly interfaces and can help you clean your system log quickly and easily.

Schedule automatic cleaning of system log on MacOS

Lastly, you can schedule your MacOS device to automatically clean the system log. This will ensure that your system log is regularly cleaned, and you won’t have to worry about doing it manually. To schedule automatic cleaning, follow these steps:

  1. Open Terminal on your Mac.
  2. Type the following command and press Enter: sudo periodic daily weekly monthly
  3. Enter your administrator password when prompted.
  4. Press Enter again. This command will schedule your system log to be cleaned daily, weekly, and monthly.

Conclusion

System logs are an essential part of your MacOS device, but they can take up a lot of space and slow down your system over time. In this post, we discussed three ways to clean your system log on MacOS: using Terminal, using third-party apps, and scheduling automatic cleaning. By following these steps, you can keep your device running smoothly and efficiently.

Feedback







Small world. Big idea!
  • Welcome to visit the knowledge base of SRE and DevOps!
  • License under CC BY-NC 4.0
  • Made with Material for MkDocs and improve writing by generative AI tools
  • Copyright issue feedback me#imzye.com, replace # with @