How to list and delete broken symlinks

August 3, 2022 symlink linux [linux]

Command to list broken symlinks:

find . -xtype l

Command to delete broken symlinks:

find . -xtype l -delete