To clean up all Linux orphan links

How to clean up all orphan symbolic links by shell CLI ?
Last edited on
I searched your title, first result linked to the following page: https://stackoverflow.com/questions/22097130/delete-all-broken-symbolic-links-with-a-line

is that what you're looking for?
Last edited on
Some distros provide Linux file utility: symlinks
Title        =symlinks - scan/change symbolic links
Version      =1.4
Desc1        =Scans directories for symbolic links, and identifies dangling,
Desc2        =relative, absolute, messy, and other_fs links.  Can optionally
Desc3        =change absolute links to relative within a given filesystem.
Author       =Mark Lord


Usage:	symlinks [-cdorstv] dirlist

Flags:	-c == change absolute/messy links to relative
	-d == delete dangling links
	-o == warn about links across file systems
	-r == recurse into subdirs
	-s == shorten lengthy links (displayed in output only when -c not specified)
	-t == show what would be done by -c
	-v == verbose (show all symlinks)
Topic archived. No new replies allowed.