0

I have a Fedora workstation, when upgrade the system some software for example LibreOffice do not delete its old symbol link in /usr/bin and when I update other software, there are a lot of warnings due to that. And in other situations, there are also this kind of problems. Is there a efficient console application to scan and automatically delete all these links whose target doesn't exist?

Open source is better. Thank you!!!

1

FSlint will do this for you, at least in its GUI. It also has command-line variants:

/usr/share/fslint/fslint/findbl /usr/bin

but that doesn’t appear to have an option to delete the broken links.

However, you don’t even need a specific tool for this, your system already has a tool which is capable of deleting broken symlinks: find. See How can I find broken symlinks for details; you can take a find command given there and add -delete to it to delete the links (after checking the output...):

find /usr/bin -xtype l -delete

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.