Install the app symlinks to locate broken symlinks on Linux

By | 2016/04/07

While it is possible to use find and other bash hackery to locate broken symlinks, an easier way is to use the command line app: symlinks. Check it out!


1. Install the package symlinks on your distro of choice. Ex:

sudo apt install symlinks -y
sudo dnf install symlinks -y

or whatever those Arch users do…


2. Next, run the following to locate dangling or broken symlinks recursively:

symlinks -r .


Lines marked as ‘dangling’ are broken symlinks that can be deleted.

Random example:

stmiller@brahms:~/Media$ symlinks -r .
dangling: /home/stmiller/Media/other/ibook_2011/Pictures/iChat Icons -> /Library/Application Support/Apple/iChat Icons/

Rock on,

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.