In this article
Read the reference before replacing it
In Terminal, replace the example path with the exact link you are investigating. Keep the quotation marks when a name contains spaces. Use ls -ld "/path/to/link" to inspect the entry itself, then readlink "/path/to/link" to print its stored destination. Do not append a slash to the link’s name for this inspection.
These commands do not repair or delete anything. The useful evidence is the destination text and the directory containing the link. A result such as ../data/note.txt is a relative destination; /Users/you/Project/data/note.txt is an absolute one. The latter starts from the filesystem root.
Apple’s Foundation documentation for reading a symlink destination makes a related distinction: a relative destination is returned as a relative path. Reading that text does not establish that the target currently exists.
| Observation | What to inspect next |
|---|---|
Destination starts with / | Whether that exact absolute location still exists |
Destination starts with ../ or a name | Resolve it from the directory containing the link |
| The link exists but opening it fails | The target path, mounted volume and access to each directory |
| Finder identifies an alias | Use the alias workflow; it is a different reference mechanism |
A Finder arrow badge alone is not enough to diagnose a Unix symlink. If you are cleaning up an ordinary Finder alias, our alias and original-file guide explains that separate task.
Relative to which folder?
Suppose a project contains Project/data/note.txt and a link at Project/links/latest. The link stores ../data/note.txt.
To follow it, start in Project/links, go up one level with .., and then enter data/note.txt. You reach the intended file. The directory where you happen to be typing in Terminal does not become the base of that stored relative destination.
There are two different paths involved when you run a command. A relative command argument such as cat links/latest is interpreted from the shell’s current working directory. After the system reaches the symlink, its stored relative destination is interpreted from the link’s containing directory. Using the link’s full path makes that first step less confusing during diagnosis.
The GNU documentation on symbolic links describes this containing-directory rule. Its command options belong to GNU tools, so do not assume every illustrated flag is available in the utilities bundled with macOS. The basic path relationship is what matters here; our Mac test below checks it directly.
Move the entire Project directory somewhere else while preserving its internal structure, and the relative route can still work. Move only latest into a deeper folder, and the same .. step may now lead to the wrong place. Rename note.txt, and the old destination text still names note.txt.
What changed in our Mac test
On November 6, 2026, we created a disposable text file and two symlinks on macOS 15.7.5, Apple Silicon. One stored an absolute destination; the other stored ../data/note.txt. Both initially opened the same marker text. No installed applications or existing user documents were involved.
| Test action | Observed result |
|---|---|
Read the relative link by its full path while the command’s working directory was / | The marker text was read successfully |
| Rename the enclosing project directory, moving link and target together | The relative link still worked; the absolute link no longer resolved |
| Move the relative link into a sibling directory at the same depth | It still worked because ../data/note.txt still reached the file |
| Move that link alone one directory deeper | Opening it failed with “No such file or directory” |
| Restore the link’s location, then rename the target file | Opening it failed again; the link itself still existed |
The sibling-directory case is a useful qualification: moving a relative link does not always break it. What matters is whether its stored route still reaches the intended destination. “Always use absolute paths” also misses the whole-tree case, where the absolute reference was the one that broke.
These are local filesystem observations, not tests of cloud synchronization, backup restoration or every application’s handling of links. A sync service may copy, exclude or otherwise handle a symlink according to its own rules. Confirm that behavior separately before moving an application’s data.
Restore the route or create a new reference
First locate the intended target in Finder and confirm its contents. A missing external volume or a renamed folder can explain a failed path without any file having been deleted. Apple’s archived aliases and symbolic links overview explains that symbolic links depend on paths. Its historical alias discussion is not a guarantee about every modern storage service.
For a link you created and control, choose between restoring the expected folder structure and making a new link to the verified location. To create a separate reference without overwriting the old one, use ln -s "/actual/target" "/path/to/new-link", substituting real paths and an unused link name. Check the new link with readlink and open a known file through it before changing anything else.
Do not add a force option merely to make an error disappear. If the proposed link name already belongs to a real file or directory, that conflict needs inspection. Keep the existing reference available until you understand which scripts or applications use its name.
If the link lives inside an installed app, framework or package-manager directory, prefer the owner’s repair or reinstall procedure. A symlink inside an application package may be part of its expected structure. Editing internal references can change what the app loads.
Keep the diagnosis narrow
A broken symlink is a failed route, not a storage estimate or a malware verdict. It is also different from a hard link, where another filename refers to the same underlying file rather than storing a destination path.
Before making a repair, record the link’s location, its literal destination, the intended target’s current location and what moved. Then verify that the chosen route reaches the right item. That small record is more useful than deleting every reference whose target was temporarily unavailable.


