Mac Remove Temp Library Files

10.04.2020
Mac Remove Temp Library Files 3,5/5 9869 votes
  • Master the command line: Deleting files and folders. You can remove files from the Trash when you encounter stubborn errors. If you've lost access to the Finder because your Mac is on the.
  • Aug 29, 2019  Step 1. Download CleanMyMac 3 for FREE from its official page. Choose Smart Cleanup on the left side of this junk-cleaning tool interface. CleanMyMac 3 will scan junk files in categories: System Junk, Photos/iPhoto Junk. Review the scan results and clean junk.

You’ve no doubt heard the term cache and temp files, at least as it relates to your Mac. There are numerous times when removing a cache or temp file may be part of a troubleshooting tip to return an app or the system to a more robust condition. It’s also common to hear about removing these files to free up space on a Mac’s startup drive.

On your Mac, drag the item to the Trash in the Dock or select the item, then press Command-Delete. If an item is locked, click Continue to confirm you want to move the locked item to the Trash.

But before we head down the road to clearing out cache and temp files, let’s take a moment to find out what functions they serve, and whether it’s really a good idea to remove them willy-nilly.

(Third-party utilities, such as TinkerTool System, can help you remove troublesome cache files.)

What Are Cache Files and Temp Files?
Cache and temp files serve a similar function; they provide a place to temporarily store data in files on your Mac.

Cache files are accessed and updated frequently, and they can remain after the app or system function that created them has closed or exited. They can also remain through shutdown or restart cycles.

Temp files are created by an app or system process to temporarily store data that is later used by the process that created the file. Unlike cache files, temp files are usually removed by the process that created them, usually when the process exits, or during a shutdown or restart cycle.

Examples of cache files include browser caches that save the information from a webpage. When you return to the same page, the browser can load the page data from the cache file, provided the page data hasn’t changed. This saves you the time it would take to access the web server and download the entire page again.

Another type of cache you use everyday on your Mac is the DNS cache. Like the browser cache, the DNS cache can let your Mac grab the IP address of a website it has visited recently without having to perform a DNS lookup, which can take a great deal of time.

Other caches are used by the system to store frequently used icons, images, and just about any type of information that is used over and over, where storing the data is faster than recreating the information every time.

(My system temp files are located in a folder named T, at the end of a cumbersome pathname.)

Temp files, on the other hand, are transitory; they tend to be removed once the app or process that created them is terminated. An example of a temp file is an application that has many levels of undo. In the loosest of terms, the undo temp file holds the state of the app at each point a command was issued, letting you go back in time (undo) to previous states. When you quit the app, the undo temp file is deleted since it’s no longer needed.

Mac Remove Temp Library Files Free

Temp files can also hold static items, such as an image, or data that will be used frequently by an app but doesn’t need to be saved beyond the current app cycle.

Where Are Cache Files and Temp Files Located?
The Mac has two primary types of cache files, System and User, which are located in three primary locations. The system caches are located at /Library/Cache as well as /System/Cache. The user caches are located at ~/Library/Cache. The tilde (~) in the last cache location is a shortcut for your home folder. So, if your home folder was named tnelson, as mine is, the full path would be /Users/tnelson/Library/Cache. As you can see, it’s easier to just use the shortcut than to type full pathnames.

I recommend leaving the system caches alone unless you’re having a specific problem whose troubleshooting guide suggests removing one or more of the system cache files. Otherwise, I tend to leave system cache management to the system.

Temp files, especially those used by third-party apps, can be located just about anywhere, making some app temp files difficult to track down. However, apps that follow good coding practices will make use of a few standard locations. Unfortunately, many of these standard locations are hidden from the Finder, blocking you from direct access. You can use the following Terminal tip to open a Finder window on two of the most used temp locations:

  • Launch Terminal, located at /Applications/Utilities.
  • Enter the following at the Terminal prompt: open $TMPDIR
  • Hit Enter or Return on your keyboard.
  • A Finder window will open on the current system temporary directory.

Note: The Finder window will have a different name for this directory. The $TMPDIR is a variable that holds the current temp directory pathname.

(Terminal’s “open” command can be used to view the directories being used by the system for temporary storage.)

Another option if your iTunes library is too big is to copy everything to an external drive. To perform this, you'll first want to enable 'External disks' and 'Hard disks' in your Mac's. How to move your Mac's iTunes Library onto an external drive. By Stephen Robles Tuesday, February 03, 2015, 09:17 am PT (12:17 pm ET) When trying to free up drive space on your Mac, one of the. Mar 16, 2020  How to Transfer iTunes Library to New Mac via External Hard Drive or USB Drive Step 1. To find the location of your iTunes media folder, launch iTunes on your old computer Then click “Edit” (PC) or “iTunes”(Mac) on the menu bar Preferences Advanced Here you will see the “iTunes Media folder location” in your computer. New

The second common temp location can also be found using Terminal. Enter the following at the Terminal prompt:

  • Open /tmp
  • Hit Enter or Return on your keyboard.
  • A Finder window will open on the tmp directory.

Should You Remove Cache and Temp Files?
Generally speaking, the Mac’s operating system is pretty good at managing both cache and temp files. The Mac OS includes maintenance routines that are run at specific times to clear out unneeded cache and temp files. In addition, most temp files are cleared out automatically by the app or process that created them. The Mac OS will also remove many of the temp files whenever you shut down or restart your Mac.

Even though the Mac OS tends to take care of cache and temp files, there are times when manual intervention may be appropriate. As mentioned earlier, deleting cache files is a common troubleshooting tip. In these cases, a specific cache file may have become corrupt, and as a result, contains bad or meaningless information that is causing a related app to lose its mind. Cache files can also become excessively large, leading to long load times for the app that makes use of the file, or unusually long times for executing a specific function.

(Using the Managed Storage feature of OS X Sierra, I found over 70 GB of cache files used by an app I haven’t used in quite a while.)

The other common reason to remove cache and temp files is to increase the amount of free space on a storage volume. In researching this article, I discovered that a number of cache files used by the Steam gaming platform had grown to over 70 GB on my Mac. This was a surprise, since I haven’t used Steam in over a year, and really had no use for those cache files. The Steam cache files got the heave-ho.

But before you dump your cache and temp files, remember that generally speaking, cache and temp files are designed to improve the performance of an app or service. So, unless you’re having issues, including needing more free space, or an app that’s behaving badly, it’s probably better to leave the cache and temp files alone and let your Mac manage them.

Removing Cache and Temp Files

Warning: Before you remove any cache or temp file, make sure you have a current backup of your Mac.

One method for removing these files is to simply navigate to their location and send the various cache and temp files to the trash. You can use the Finder and the tips mentioned above to locate the files. Do not, however, delete the various cache folders; just the actual cache files within the folders.

An even easier way to access and clear out the files is to use a third-party app designed to assist in managing cache and temp files.

(Cocktail provides an easy-to-use interface for deleting cache files.)

A number of these apps come to mind; most are available as demos to try out:

Mac Remove Temp Library Files Windows 10

  • Cocktail: This is a general-purpose utility for repairing and optimizing your Mac. It also gives you access to many of the Mac’s hidden settings, including the ability to run the various cache maintenance scripts.
  • Onyx: Provides access to hidden Mac features, system maintenance, and the ability to customize the system and some apps.
  • TinkerTool System 5: Provides access to many hidden preferences and settings of the operating system. Includes the ability to restore caches if you discover that removing a cache didn’t fix an issue.

Remember that cache and temp files are there to help performance. For the most part, I don’t recommend wholesale removal of these files as any type of “maintenance” practice. Instead, selectively removing a cache or temp file as part of a troubleshooting process can be a useful task.

Mac remove temp library files in mac

Benefits of deleting temporary files

Storing temporary and cache files, alongside everything else stored in your Mac, takes up space that could be put to better use. Depending on how many apps you use on a regular basis, you could be storing dozens - even hundreds - of cache and temporary files without realizing it, all incrementally slowing your Mac down.

Cache and temporary files can include everything from web browser cache and history, including cookies and passwords, to messaging cache folders, partially completed downloads, app temp files and folders, and so much more that is taking up space on your Mac.

Types of temporary files:

  • browser cookies
  • outdated system logs
  • application cache
  • intermediate document versions

Why do browsers collect cache?

Most web browsers will only try to hold onto a limited amount of cache data and cookies. This helps your browser run faster when loading a web page that you’ve visited before. But it won’t hold onto everything. Most will try and self-clean this data after a period of time.

And apps, also hold onto as much as they need, and will sooner or later, try and clear out that data. Automated cache clearing doesn't always work and sometimes when an app or web browser isn’t working properly - or if you've fallen victim to malware or adware - a direct intervention is needed to clear out temporary files and cache data to get an app, browser or other application to work as it should.

The old caches may cause software glitches and compatibility issues.

Delete temporary files with CleanMyMac

Clearing out unnecessary temporary and cache files will increase the amount of hard drive space available, and it should improve the overall performance and speed of your Mac. You can do this one of two ways: manually — which we cover below — or using a time-saving tool, such as CleanMyMac X.

Get a free version of CleanMyMac — a link to free download

According to the developer, this app removes up to 74 GB of junk on average Mac. Most of it is system junk, in other words, temporary files and caches. If you are overloaded with temporary files and too much cache data, it will highlight this and you can safely delete everything, saving you time and space. Another way to clear out cache files and data is to go through your files manually. Here is how you do that.

How to delete temporary files manually

Before you begin, always back up your Mac. Whether you use Time Machine, iCloud, or a third-party hard drive or cloud-based storage system, make sure you’ve got everything backed up.

There are 4 main types of caches you'll encounter on your Mac:

Here is how to clear temporary files from a Mac:

  1. Quit or close any open and active apps. To make sure this is done, Force Quit anything that hasn't closed properly. Anything that needs to be closed that way might benefit from a cache clear out.
  2. Go to the Finder in macOS
  3. If you are using Sierra or a more recent OS, hold down the SHIFT key. Or for those using an older macOS, press down the OPTION or ALT key, and pull down the Go menu in Finder.
  4. Choose Library from the options presented in the Go menu
  5. Once you’ve got access to Library, go to the Caches folder

  6. Now this will show you the full range of cache and temporary files that are being stored on your Mac. Be certain which ones you want/need to delete before sending them to the Trash.
  7. To send cache folders to the Trash, either right-click and select Move to Trash, or drag and drop them into the Trash.
  8. Empty the Trash — the same way you would when removing any other files - to clear them out of your Mac.

Typical cache file looks like this: “com.apple.iTunes”.

Deleting browser cache

Mac Temp File Cleanup

Unless you are either deleting everything, with some apps you can make these same changes in settings. In every web browser, you can clear the cache, cookies, saved passwords and browser history.

How to empty the cache in Safari:

Other web-based apps also have settings that give you control over the cache and cookies, so to avoid deleting everything, you might want to go to the specific app containing the data and clearing it out that way.

Another way to safely delete temporary files, cookies and cache is to Restart your Mac. If you keep it running and in sleep mode for days or weeks at a time, there are a lot of automatic maintenance systems that can’t operate until you restart or shut down your Mac then start it up again. Restarting your Mac is doing it a big favor and should help it run smoother

Locate hidden temporary folders with CleanMyMac

Did you know, there is a way to peek under the hood of your Mac? The tool we've just told you about, CleanMyMac X has an instrument for viewing the inner parts of your macOS. It's called Space Lens. It looks like this:

These 'bubbles' represent folders of different size. Here you can explore the Library and other distant parts of your computer.
Get the app here for free (a link to the developer's site)
Once you install the app, click the Space Lens tab in the sidebar.
Explore! This tool is really fun.


The outdated system files may hold back the performance of any Mac, even the most powerful models. And that's why Mac cleaning software exists. Either you choose a manual or automatic cleanup, your Mac will thank you for it. Hope you've learned something helpful today. Come back for more Apple/Mac tips.