Back to tutorials

150 Clean C4R Files

Chris McKeown / July 1, 2025

Cloud

~6 min read1,169 words
0 views

Overview

Clean C4R Files deletes temporary Revit cache files from directories you specify, freeing disk space and clearing potentially corrupted cache data that can cause cloud sync issues. The tool reads a list of directories from a Windows environment variable you configure, confirms before deleting, and reports how many files and folders were removed.

Use sparingly. After running this tool, the next time you open a cloud-based file (BIM 360/ACC) Revit must re-download it from the cloud, which takes additional time. Only run when experiencing cloud sync issues or when disk space is critically low.

Clean C4R Files

Table of Contents


Key Features

  • Deletes files and subfolders from all directories listed in the Revit_Temp environment variable
  • Requires only one Revit session to be open — warns and exits if multiple sessions are detected
  • Confirmation dialog prevents accidental deletion
  • Reports count of files and folders deleted, and lists any paths that failed
  • Handles locked files gracefully — skips them without stopping the rest of the operation
  • Fully user-configurable via the environment variable (no code changes needed)

Requirements

  • Only one Revit session may be open when the tool runs
  • The Revit_Temp Windows environment variable must be created before running — the tool displays setup instructions if it is missing
  • All cloud work should be synced to central before running, as local cached files will be deleted

Running the Tool

One-time setup — create the environment variable

The tool reads its target directories from a Windows User environment variable named Revit_Temp. This must be created before the tool will do anything useful.

  1. Right-click This PCPropertiesAdvanced system settingsEnvironment Variables
  2. Under User variables, click New...
  3. Set Variable name to Revit_Temp
  4. Set Variable value to a comma-separated list of directory paths — see the example below
  5. Click OK on all dialogs, then restart Revit

Example variable value:

%TEMP%,%LocalAppData%\Autodesk\Revit\PacCache\,%LocalAppData%\Autodesk\Revit\Autodesk Revit 2024\CefCache,%LocalAppData%\Autodesk\Revit\Autodesk Revit 2025\CefCache

Add a CefCache entry for each installed Revit version. Common paths to include:

PathContents
%TEMP%Windows temporary files
%LocalAppData%\Autodesk\Revit\PacCache\Revit package cache
%LocalAppData%\Autodesk\Revit\Autodesk Revit [version]\CefCacheBrowser/cloud cache (one per version)

Running

  1. Sync all cloud work — ensure nothing uncommitted remains in your local files.
  2. Confirm only one Revit session is open — check Task Manager if unsure. The tool will exit with a warning if it detects more than one Revit.exe process.
  3. Run the tool — either find Clean C4R Files on the Bonus Tools Ribbon or use 115 Search Tools, or press the assigned keyboard shortcut.
  4. Read the confirmation dialog carefully and click OK to proceed, or Cancel to abort.
  5. Wait for the process to complete — time varies from seconds to a few minutes depending on cache size.
  6. Review the results message showing files deleted, directories deleted, and any paths that failed.

After running

The next time you open a cloud-based Revit file, Revit will re-download it from BIM 360/ACC. This first open will be slower than normal — subsequent opens will return to normal speed.


Tips and Best Practices

  • Don't run this routinely. The re-download cost is real. Reserve it for when you're experiencing cloud sync errors, or when disk space is genuinely low. Monthly at most for healthy systems.
  • Sync everything first. The tool deletes local cache data. Any unsynced work in a cloud file could be in that cache. Run 151 Reset & Sync or 152 Reset, Sync & Compact before running this tool.
  • Update the variable when installing new Revit versions. Each version has its own CefCache folder. Add the new path to Revit_Temp so it's included in future cleanups. Remove paths for versions you've uninstalled.
  • Only include genuine cache directories. Never add paths that contain project files or anything you need to keep. The tool deletes everything in the listed directories — there is no undo beyond the Recycle Bin (and some deletions bypass it entirely).
  • Run at the end of the day. The slower next-open is much less disruptive when it happens first thing the next morning rather than mid-session.

Common Use Cases

Resolving cloud sync errors — If you're getting "Cannot connect" messages or sync failures that persist after restarting Revit and verifying your network connection, clearing the cache forces a fresh download and often resolves corrupted cache state.

Disk space recovery — Revit cache can accumulate to several gigabytes, especially across multiple installed versions. Running the tool when disk space is low typically recovers 500 MB to several GB.

After installing a new Revit version — Update the Revit_Temp variable to include the new version's cache path, then run the tool to start clean.

Periodic maintenance — Some teams include this in a monthly maintenance checklist alongside Purge Unused and other file hygiene tasks, particularly on machines used heavily for cloud-workshared projects.


Troubleshooting

"Must close all other Revit sessions. You have: X open" The tool detected more than one Revit.exe process. Close all other Revit windows. If processes remain after closing, end them via Task Manager → Processes → Revit.exe. Then re-run the tool.

Tool displays the environment variable setup instructions The Revit_Temp variable either doesn't exist or is empty. Follow the one-time setup steps above, restart Revit, and run again.

Results show 0 files deleted The directories listed in Revit_Temp may already be clean, may not exist, or may have incorrect paths. Paste each path into Windows Explorer's address bar to verify it resolves to a real directory. This is not an error if the cache was already empty.

Some directories listed as failed The tool skips files and directories it can't delete (locked by another process, permission-restricted, or path doesn't exist) and reports them. If a path doesn't exist (e.g. for an uninstalled Revit version), remove it from the variable. If files are locked, a system restart and re-run usually clears them.

Cloud files won't open after running Check your internet connection and verify you're signed in to Autodesk in Revit. The cache cleanup itself does not affect credentials or connectivity — if files won't open, the issue is likely network or sign-in related, not the cleanup.

Accidentally deleted something important Check the Recycle Bin first — some files may be recoverable. Cloud-cached files can be re-downloaded by opening the file from BIM 360/ACC. For anything else, restore from backup. This is why the variable should only ever contain genuine cache/temp directories.

The variable won't save (locked-down system) Some corporate environments restrict user-level environment variables via Group Policy. Contact your IT department — they can either grant permission or deploy the variable via login script or Group Policy for the whole team.