AI Coding Tools Filling Up Your C: Drive? A Symbolic Link Migration Guide
AI coding tools depend on local caches, and those caches can quietly eat tens of gigabytes on the system drive until new sessions fail when free space hits zero. Deleting the files is the wrong fix: removing model weights forces re-downloads, and removing plugins breaks dependency trees. This guide explains where the space actually goes, why physically relocating the data beats deleting it, and how symbolic links let applications keep reading the original paths after a move. It covers the differences between Windows symbolic links, directory junctions and hard links, the equivalent ln -s approach on Linux and macOS, a five-step migration procedure, how to deal with lingering Node.js processes and locked files, how to roll the change back, common pitfalls, and longer-term options such as externalizing caches to another volume, using object storage, setting up log rotation and running dev environments in containers.
Introduction: when your C: drive runs out of breath
AI-assisted coding tools have become a core part of the developer’s daily workflow. They speed up code completion, explain logic and generate tests. But after a few weeks of heavy use, many people run into the same problem: the system drive — usually C: — keeps losing free space for no obvious reason, and eventually a new session fails outright because there is nothing left to write to. By the time the OS starts warning you, tens of gigabytes of files have piled up that look impossible to delete and too risky to touch.
This is not a tool defect. It is the inevitable result of running these tools locally. Understanding what makes up their disk footprint, and knowing how to relocate it properly, is a basic operational skill for anyone who uses them heavily.
1. Why AI coding tools eat so much disk space
Before fixing the problem, find out where the space went. The footprint comes from three places:
Local model cache. To keep completion and inference latency low, many tools cache model weights or intermediate artifacts locally. This data is often very large, and it is a core runtime dependency — deleting it just triggers a fresh download every time, which is a bad trade.
Plugin and extension directories. A mature AI IDE depends on a rich plugin ecosystem, and every plugin ships its own dependencies (Node.js packages, for example). As plugins accumulate, the dependency tree expands quickly. These directories usually live under the user profile path, and once nested several levels deep they can easily reach several GB.
Inference data and log files. Across multi-turn conversations, tools continuously produce session context, intermediate reasoning data (directories such as .code-reasoning) and debug logs. This data is what makes it possible to revisit earlier conversations and debug problems, but with no automatic cleanup it accumulates without limit — a slow-burn space killer.
It is worth stressing that most of these files must be kept. Delete the model and it gets downloaded again; delete the plugins and they have to be reinstalled; delete the session context and continuity is lost. So the question is never “delete or not” — it is “where should it live”.
2. Why “just delete it” is a bad idea
When the warning appears, the first instinct is to delete the cache or the log files. That approach is high risk:
- Deleting the model cache triggers a re-download. Besides wasting bandwidth, it makes the tool unusable in offline environments.
- Deleting plugin directories breaks dependency integrity. At best plugins stop working; at worst the tool will not start.
- Manual deletion makes it very easy to damage configuration files, and that damage is often irreversible.
The cleaner idea is to move the data physically instead of deleting it: relocate the files to a drive with spare capacity (D:, G:, and so on) while making the system and the application believe nothing has moved. That is exactly the problem symbolic links solve.
3. The core idea: how symbolic links work
A symbolic link is a special file system object. It stores no data of its own — it acts as a pointer to a real file or directory somewhere else. When an application accesses the link path, the operating system transparently redirects the read to the real location. From the application’s point of view everything is unchanged; it never notices that the physical location moved.
On Windows there are three link types, and knowing how they differ is the precondition for operating safely:
- Symbolic link: works across volumes and drive letters, applies to both files and directories, and is the best option for a “move”. Creating one usually requires administrator privileges or Developer Mode enabled.
- Directory junction: directories only, supports crossing volumes, has looser privilege requirements and very good compatibility — a dependable choice for migrating directories.
- Hard link: files only, within the same volume, no cross-drive support and useless for directories, so it does not fit a cross-disk migration.
The core Windows commands look like this (illustrative):
:: Syntax overview:: Create a directory symbolic linkmklink /D "original-path" "target-path":: Create a directory junction (safe choice for cross-volume moves)mklink /J "original-path" "target-path":: Create a file hard link (same volume only)mklink /H "original-path" "target-path"
The basic procedure is to move the real directory to the target drive first, then create a link at the original location pointing to the new one. For example, if the original directory is C:\Users\<username>\AppData\... and the target is D:\AIToolsCache\..., move the data first and then create the link:
:: 1. Close the tool, then move the real directory to D:move "C:\Users\Me\AppData\Cache" "D:\AIToolsCache\Cache":: 2. Create a junction at the original location pointing to the new directorymklink /J "C:\Users\Me\AppData\Cache" "D:\AIToolsCache\Cache"
Once this is done, the application accesses the original path and is silently redirected to D: — the user notices nothing.
On Unix-like systems (Linux, macOS), the equivalent is a symbolic link:
# Move the directory first, then create a symbolic link at the original locationmv ~/.config/tool-cache /mnt/data/tool-cacheln -s /mnt/data/tool-cache ~/.config/tool-cache
4. Migration in practice: a step-by-step guide
To keep the migration safe and repeatable, follow these steps:
Step 1: Shut down the relevant processes completely. The tool must be fully closed before you start. These tools often leave dozens of Node.js processes running in the background even after the window is closed, and those processes hold file locks that make moving or deleting fail with a “file is in use” error.
Step 2: Force-terminate leftover processes. If a normal shutdown does not work, kill them at the system level. On Windows use Task Manager, or from the command line:
:: See which process holds a handle on a given directory:: (requires a general-purpose system utility such as handle):: Force-terminate processes by image name (node in this example)taskkill /F /IM node.exe
Step 3: Identify the migration targets. Write down the full paths of the cache, plugin and reasoning-data directories you intend to move. It is worth sizing each one first and starting with the largest.
Step 4: Move the data and create the link. Using the commands above, move the real data first and then create a junction or symbolic link at the original location. When moving very large directories, prefer a copy tool that supports resuming and verification, confirm data integrity, and only then delete the source.
Step 5: Verify. Restart the tool and confirm that completion, session history and plugin loading all work. Compare disk usage before and after to confirm that space was actually freed.
5. Dealing with process holds and file locks in general
When files “won’t move and won’t delete”, the cause is usually not permissions but process locking. Beyond killing processes manually, there are a few general troubleshooting approaches:
- Use the operating system’s built-in or a third-party handle viewer to find out which process holds the file handle.
- Schedule the migration for a window in which the tool is completely shut down, rather than doing it while it runs.
- For stubborn locks, reboot the system to release all handles and then perform the migration.
Once you understand how locking works, it is easy to explain why force-terminating processes often turns a failed migration into a successful one: the root cause was held file handles.
6. A rollback-safe migration strategy
Any operation that touches the system drive should leave you a way out. The big advantage of the symbolic link approach is that it is naturally reversible:
Because the original location is only a link to the new location, rolling back means doing the reverse — delete the link (not the real data) and move the data from the target drive back to its original location. So keep records throughout the migration:
- Note the “original path → new path” mapping so you can troubleshoot or restore later.
- Back up critical configuration directories before migrating, so a mistake can be recovered from quickly.
- Migrate regenerable data such as caches and logs first, and leave configuration and credential directories for last to keep the risk low.
One warning: when deleting a link, make sure the target of the operation really is the link and not the real directory, or you will lose data. In Windows Explorer, linked directories usually carry a shortcut arrow overlay; from the command line, check the type with dir.
7. Caveats and risks
- Privilege requirements: creating symbolic links usually means running as administrator, since a link is a system-level object; junctions have looser requirements and are a reasonable fallback.
- Cross-volume compatibility: symbolic links and junctions can cross drive letters, hard links cannot. Choose one of the first two when migrating to a different disk.
- Back up first: migration is essentially “move + link”, and a mid-way failure can leave the data in an intermediate state. Back up anything important before you start.
- Check tool behavior: after migrating, restart the tool and see whether it reads the relocated directories correctly. A few tools validate paths in unusual ways — roll back if anything misbehaves.
- Be careful with automation scripts: “one-click move” scripts floating around online may include high-risk operations such as force-killing processes and batch-moving directories. Review the script before running it, understand what each step does, and avoid wiping out critical system directories.
8. Advice for teams and for the long term
Migrating with symbolic links is a personal, short-term fix. From a longer perspective, the problem is better addressed at the engineering and infrastructure level:
- Externalize caches to a separate disk or mount point: using environment variables (such as a general cache path variable) or a consistent mount, let caches land on the large-capacity drive by default, so the system drive never reaches a critical state in the first place.
- Use object storage for large files: teams can manage bulk data such as model files centrally in object storage and pull it on demand, saving local space and making sharing easier.
- Establish a cleanup policy for logs and reasoning data: with log services and monitoring alerts, define rotation and expiry rules so data does not accumulate forever.
- Isolate with containers: running the development environment on a container platform and keeping caches and dependencies in container volumes, combined with image layering, noticeably improves disk management on the host.
Conclusion
AI coding tools multiply developer productivity, but their local caching quietly drains the system drive. Instead of waiting passively for the warning, understand what the disk usage consists of and use symbolic links — a mature, reversible, cross-platform technique — to move that space onto a drive with room to spare. Master the methodology of migrate rather than delete, link rather than copy, back up first, record the mapping, and you can keep enjoying the help of AI while your system drive stays out of breath.
