[2023 Guide] How to Delete Log Files on Mac

This is a complete guide on how to delete log files on Mac.

Whenever your system performs a task or operation, it writes it as an entry in the system logs. It’s what allows techies to figure out the root of a problem by looking at the history of what the system has performed. Of course, if you’re not a techie and you can’t read these logs, then chances are they’re useless to you. Considering how they consume storage space, it’s best if you just delete them, but that’s often easier said than done. After all, they are system files, and chances are the directory of your system logs is hidden somewhere in your main drive. In short, finding them is already a relatively difficult task.

Moreover, there’s also a chance that the directory of your system logs is encrypted or protected. In that case, you won’t be able to delete them willy-nilly, but that’s why you’re here. But first, is it even safe to delete system log files on Mac computers?

Is It Safe to Delete Log Files on Mac?

The macOS is constantly working to perform various operations on your computer. Some of these operations are recorded via log files, and over time, the computer may build up a large collection of these files somewhere on your computer. At some point, they can take up several GBs worth of disk space. Thankfully, it is safe to delete them since the Mac operating system creates a new copy, but with no data from the previous log file. That means if you delete a log file with a size of 2MB, it’ll be permanently gone, but the system will create a similar log file with the same structure, but with a size of only a couple of KBs.

It may not amount to much, but if you consider the fact that the Mac storage has thousands of log files, the initiative of deleting them will allow you to save several GBs worth of file size. That’s definitely worth the effort of deleting the log files.

So, how should you approach this task? Read on to find out.

how to delete log files on Mac

Method #1: Delete Log Files on Mac Via Finder

The first and perhaps simplest method to delete log files on Mac is to use Finder—the file management app of macOS computers that allows you to move from one folder to another. You can use Finder to locate the folder where you can find the app and system logs. Then, once you find them, you simply have to drag and drop them in the Trash. It’s relatively simple, and it should work most of the time. Without further ado, here’s how to delete log files on Mac using the Finder app:

  1. Open a session of Finder on your Mac computer.
  2. Click the Go option from the top menu bar.
  3. Select Go to Folder… from the dropdown menu.

A popup window will appear which allows you to type in a file path where you want to go. Since there are two types of logs, application logs, and system logs, there are two file paths you must type into this window.

  • For application logs, type in ~/Library/Logs. For system logs, type in /var/log.
  • Click Go to navigate to that file path.
  • Find and delete the log files you want to delete. Keep in mind that you can delete them all if you want, as the system automatically recreates them if you do. To delete a log file, drag and drop it into the Trash icon from the Dock.

Note: Alternatively, you can click the log file while holding the Ctrl key, then select Move to Trash.

If you’re not sure if this is the right decision, you can also create a copy of the files by selecting them all, then dragging and dropping them into a new folder while holding the Option key on your keyboard. That should duplicate them quickly. Also, make sure you delete the files from the Trash if you want to permanently delete them. If not, then they would still consume disk space on your computer in the same way they take disk space when you have yet to delete them.

delete log files on mac via finder

Method #2: Delete Log Files on Mac Using Terminal

Terminal is the command line of macOS computers. It allows you to execute commands by entering a bunch of codes on the command line. With it, you can perform various tasks, including file deletion. Here’s how you can use it for your purposes:

  1. Open Finder on your computer.
  2. Click Applications from the left sidebar of the window.
  3. Find and open the Utilities folder.
  4. Locate and double-click the Terminal icon.
  5. On the Terminal, type in the following text: sudo rm -r [File Path]. Replace the [File Path] part with the file path of the log files, which should either be ~/Library/Logs or /var/log.
  6. Press Enter or Return.
Delete Log Files on Mac Using Terminal

Method #3: Delete Log Files on Mac With Mac Cleaner

As you use the aforementioned methods, you may find that there are two main problems with this task. One, the folder that contains the system log files may vary according to numerous factors. These may include your computer’s model, macOS version, and settings. And two, the log files might be encrypted, so you cannot delete them easily as you may encounter an error of some sort. The good news is there’s a way to bypass these issues, and that involves using Mac Cleaner.

Mac Cleaner is a cleaning app that specializes in deleting unnecessary files, and that includes system log files. But more importantly, it can detect system log files automatically, fixing the first issue. Moreover, it can bypass the encryption of folders without the need for admin privileges, fixing the second issue. To use the software, here’s what you need to do:

Step #1: Set Up Mac Cleaner on Your Computer

Before anything else, you must first gain access to the software. For that to happen, you must open your browser and visit the Mac Cleaner download site. Click the Download Now button that’s on that site to prompt the download of a DMG file. That would be the software installer. Simply open it once the download is complete to run the installer, then just follow the onscreen instructions from that point onwards. The software opens automatically once it’s installed.

launch mac cleaner

Step #2: Pick Clean up Junk

On the left side of the interface, you’ll find six different options, namely (1) Clean Up Junk, (2) Delete Large Files, (3) Delete Duplicate Files, (4) Erase Private Data, (5) Speed Up Your Mac, and (6) Manage Apps & Extensions. These correspond to the modules that Mac Cleaner currently has. Since system log files are considered junk files, you’ll mostly need the help of the first module, Clean Up Junk, which allows you to scan for and delete files like System Junk, App Junk, Trash Bin, iOS Junk, iTunes Junk, Unused Disk Images, and Downloads. To select the module, simply click on it from the left sidebar.

clean up junk

Step #3: Click the Scan Button

When you select the Clean Up Junk module, the software will split into two parts. One side says Quick Clean while the other says Deep Clean. The Quick Clean option scans your computer for the following: System Junk, App Junk, Trash Bin, and iTunes Junk. Meanwhile, Deep Clean scans your computer for the following: Downloads, iOS Junk, and Unused Disk Images. You only have to select between these two options, then click the Scan button at the bottom area of the software.

quick clean scan mac

Step #4: Pick a File Category and File/s

Once you click the Scan button from the previous step, the software will take you to the next page. There, you’ll find a list on the left side of the interface consisting of file categories like System Junk, Downloads, Trash Bin, Unused Disk Images, and more. To proceed, you must select a category. Doing so will make a new list appear on the right side of the interface, from which you’ll find actual files like images, videos, documents, archives, etc. You must select items from this list by clicking on their corresponding checkboxes. You can also click the checkbox for Select All if you wish to delete all items on the list.

choose a file category and file

Step #5: Delete the File/s

All that’s left now is to simply delete the files you’ve selected. To do that, you must click the Clean button located in the upper right corner of the window. That should finalize the process, though you may have to wait for a few minutes for it to finish.

That’s how to delete log files on Mac quickly. Not only do you not have to find the log files yourself, but it can also delete files that you didn’t know existed. Overall, using Mac Cleaner is a good idea if you simply wish to clear space on your Mac.

delete the Junk files

Parting Words

Though log files are system files, they’re not that difficult to get rid of as long as you know what you’re doing and how to delete log files on Mac. But as stated earlier, log files should be safe to delete. If you encountered an error or any issue of some sort after following any of the aforementioned methods to delete the log files, chances are you did something wrong. Perhaps you deleted the wrong files that are actually important. Maybe you accidentally changed a specific setting while you were deleting the logs. Either way, it shouldn’t cause any error.