The Mac OS X Terminal can become slow to launch over time, but there’s an easy solution to speed it up again.

By deleting the Apple System Logs, you can shave the lag in opening and launching new Terminal windows/tabs dramatically, in my case from about a three second delay to instantaneous!

Here’s how to delete the log files and gain your Terminal app launch speed back:

Fix a Slow Terminal Launch Time by Clearing Log Files in Mac OS X

At the command line, use the following syntax:

cd /private/var/log/asl/

Now you’ll want to verify that you are in the proper directory by listing the .asl log files:

ls *.asl

Finally, if only .asl files turn up as the result, type the following command to delete them:

sudo rm !$

Update: we adjusted the above commands per user comment, it is now safer for more novice users. Here’s the old command maintained for posterity, it’s been struck out because it’s a bit more risky for beginners to follow:

At the command line type the following:

cd /private/var/log/asl/

then, inside that directory, type:

sudo rm -rf *.asl

Warning: be absolutely certain that you only type the sudo rm -rf command INSIDE the /var/log/asl/ directory! rm -rf * deletes all files in a directory, no questions asked, so if you perform that task in the wrong directory (like home folder) you are going to have a serious problem! I’m assuming you have moderate experience in the command line environment – if you do not, you probably won’t need this tip anyway.

Update 2: As Marc points out in the comments, it’s safer to specify deleting only the log files. Above command has been altered to reflect this. An alternative and shorter command is this one:

sudo rm -rf /private/var/log/asl/*.asl

The bottom line is, be cautious with sudo and rm commands, particularly when wild cards are in use.

Did this sped up the launching of Terminal app for you? This trick continues to work in all versions of OS X, so if your Mac has a slow launching Terminal, give this a try and let us know in the comments.