How to Find and Remove Duplicate/Unwanted Files in Linux Using ‘FSlint’ Tool

Very recently I have written a post on fdupes utility which is used to find and replace duplicate files in Linux. This post was very much liked by our readers. If you have not gone through the fdupes utility post, you may like to go through it here:

  1. fdupes Tool to Find and Delete Duplicate Files

This post aims at throwing light on what is fslint, its features, installation and usages.

Find and Delete Duplicate Files in Linux
FSlint – Find and Delete Duplicate Files in Linux

What is fslint?

fslint is a Linux utility to remove unwanted and problematic cruft in files and file names and thus keeps the computer clean. A large volume of unnecessary and unwanted files are called lint. fslint remove such unwanted lint from files and file names. Fslint help fight against unwanted files by coping with duplicate files, empty directories and improper names.

Features of fslint

  1. It is a combination of different tools that look after duplicate files, empty directories and improper name.
  2. Simple GTK+ Graphic front-end as well as command-line.
  3. Fslint cope with lint that relates to Duplicate files, Problematic filenames, Temporary files, Bad Symlinks, Empty directories and Non-stripped binaries.
  4. Help you in reclaiming disk space that were used by unnecessary and unwanted files.

Install fslint on a Linux

Installation of latest version of fslint package can be installed as easy as executing following command on Debian based systems such as Ubuntu and Linux Mint.

$ sudo apt-get install fslint

On CentOS/RHEL based distributions, you need to active epel repository to install fslint package.

# yum install  fslint
# dnf install  fslint    [On Fedora 22 onwards]

How do I use fslint Command?

Hope you know one of the basic rule of computation and understand the risk – have backup. Before you start testing this application make sure you have backup of everything on your system, so that even if an important file gets deleted you may restore almost immediately.

Now as you know that fslint is one such application that has a command-line interface as well as a front-end GUI at the same time. You may use either.

For developers and administrators, CLI version is preferred as it gives you immense power. GUI front-end is best suited to newbies and those who prefer GUI over CLI.

fslint Command Line Usage

The command line version of fslint is not on the path of most of the Linux users. You may access it at the location /usr/share/fslint/.

$ ./usr/share/fslint/fslint/fslint
Sample Output
-----------------------------------file name lint
./.config/google-chrome/Default/Pepper\ Data/Shockwave\ Flash/WritableRoot/#SharedObjects/NNPAG57S/videos.bhaskar.com/[[IMPORT]]
./Documents/.~lock.fslint\ -\ Remove\ duplicate\ files\ with\ fslint\ (230).odt#
./Documents/7\ Best\ Audio\ Player\ Plugins\ for\ WordPress\ (220).odt
./Documents/7\ Best\ WordPress\ Help\ Desk\ Plugins\ for\ Customer\ Support\ (219).odt
./Documents/A\ Linux\ User\ using\ Windows\ (Windows\ 10)\ after\ more\ than\ 8\ years(229).odt
./Documents/Add\ PayPal\ to\ WordPress(211).odt
./Documents/Atom\ Text\ Editor\ (202).odt
./Documents/Create\ Mailchimp\ account\ and\ Integrate\ it\ with\ WordPress(227).odt
./Documents/Export\ Feedburner\ feed\ and\ Import\ it\ to\ Mailchimp\ &\ setup\ RSS\ Feed\ Newsletter\ in\ Mailchimp(228).odt

----------------------------------DUPlicate files
Job 7, “/usr/share/fslint/fslint/fslint” has stopped

Important: Two things you should be kept in mind at this point. First fslint don’t delete any file on its own, It just shows you the lint files, their location and their name. You have to decide what to do with them. Second is fslint by default start searching from your ‘/home’ directory.

To search a different other than your /home directory, you must pass the directory name with the command, as:

$ /usr/share/fslint/fslint/fslint /home/avi/Pictures
Find Duplicate Files in Linux
Find Duplicate Files

To search recursively to all the sub-folders, you should use flag ‘-r’, simply as:

$ /usr/share/fslint/fslint/fslint -r /home/avi/Music/
Find Duplicate Files Recursively
Find Duplicate Files Recursively

fslint GUI Usage

You may fire the GUI Application built on top of fslint by typing fslint from Linux terminal or from the Application Menu.

$ fslint-gui
fslint Gui Tool
fslint Gui Tool

Everything in GUI is simple to understand. All you need to do is:

  1. Add/remove the directories to scan.
  2. Select to scan recursively or not by checking/unchecking checkbox on the top-right.
  3. Click on ‘Find’. And all done!

Again you should remember, this utility do not delete the lint files but provide you with the information only and leaves everything on you.

Conclusion

fslint is a perfect tool that remove lint of various types from a file system. Though it needs improvement in certain gray areas: –

  1. A bit slow for duplicate photo detection.
  2. Requires some improvement in User Interface.
  3. No Progress meter.

Hope you liked the post. If yes! Be audible. Post your valuable feedback in the comments below. Stay tuned and connected to Tecmint while I am working on another post you will love to read. Like and share us and help us get spread.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Avishek
A Passionate GNU/Linux Enthusiast and Software Developer with over a decade in the field of Linux and Open Source technologies.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

17 Comments

Leave a Reply
  1. Linux Mint 20 has gdebi functionality upon install. If the gdebi core is not yet installed in an instance of Ubuntu, it may be added in the Terminal app using:

    $ sudo apt install gdebi-core
    
    Reply
  2. Useful GUI apps for finding duplicate files in Linux include dupeGuru and FSlint – among others. FSLint is now depreciated due to dependence on Python 2, but still works well to find and remove duplicate files as long as the now no longer supported Python 2 is installed.

    To add FSlint to Ubuntu 20.04 and Linux Mint Cinnamon 20:

    Download or move into the Home > Downloads folder these three files:

    $ wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-6_amd64.deb  
    $ wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-glade2_2.24.0-6_amd64.deb
    $ wget http://old-releases.ubuntu.com/ubuntu/pool/universe/f/fslint/fslint_2.46-1_all.deb 
    

    In the Terminal App run:

    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ cd Downloads 
    $ sudo gdebi python-gtk2_2.24.0-6_amd64.deb
    $ sudo gdebi python-glade2_2.24.0-6_amd64.deb
    $ sudo gdebi fslint_2.46-1_all.deb
    $ sudo reboot
    

    Note: If preferred (thanks go to N0rbert for their post), sudo apt-get install ./*.deb installs all deb’s in a folder in one step, but for simplicity sake, albeit ironic as that may be, I am using gdebi on each deb one at a time. Heck, the antiquated MS Windows user in me may even reboot between installs for peace of mind.

    And now FSlint can be used on Unbuntu 20.04 to find and remove duplicate files as well as across an entire QNAP NAS by tunneling to Files > Computer > nas_share in Ubuntu Linux Station 20.04 or also on a PC using Linux Mint 20.

    Hopefully, FSlint is updated in 2021. The combo of Ubuntu Linux Station Ubuntu 20.04 and FSlint is a real time-saver on a QNAP, and while I’ve been using Windows and macOS for decades, my go-to operating system to get real GUI-based work done is Linux Mint. The free Open Source app pool available today is simply amazing.

    Cheers :)
    Jeffrey A. Nowak, Ph.D.

    Reply
  3. Great tool. Is there a way to not follow symlinks? from what I understand the -s is to follow, so does it by default not follow them?

    Thank you for this tool.

    Reply
  4. Doesn’t install for me on Mint 20:

    $ sudo apt-get install fslint
    [sudo] password for dave:     
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package fslint is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'fslint' has no installation candidate
    
    Reply
  5. I set this to scan a 320mb HDD last night. After 12 hours it still says “processing”. Does it take that long or do I bail? Thanks

    Reply
      • @Ravi, thanks but I don’t understand what you mean by “part wise”. I later realized that my NAS is mounted in my home directory. Its 1tb & fairly full si no wonder it took a long time! When I excluded that path it only took a few minutes.

        Reply
  6. Hello Good day, I use a software called Duplicate Files Deleter, it’s very easy to use and after it finds the duplicate files it lets you chose what you want to do with them (copy/delete/move). You can even check network files and you can check multiple paths in the same scan. This helps me a lot. I hope you too.

    Reply
  7. You have some Duplicate Files on your computer which hampers your memory space.
    Just use “DuplicateFilesDeleter”. If you use this software you will be get comfortable.

    Reply
  8. There are typos in your article:

    # yum install fdupes
    # dnf install fdupes [On Fedora 22 onwards]

    Should that reads

    # yum install fslint
    # dnf install fslint [On Fedora 22 onwards]

    Otherwise, good article

    Reply
  9. Thanks for the post,
    but I think you missed one great software, brother. “The Duplicate Files Deleter”, That is to remove all the unwanted, duplicated files from your machine.
    The software called the Duplicate Files Deleter will do a thorough search of your hard disk and find out the two or more duplicate files of the same file which may be stored at different locations.

    Thanks all tecmint followers for your times.

    Reply
  10. I installed FSlint. It works beautifully in identifying duplicates and selecting same for deletion. However the delete function does not delete the files. It was suggested elsewhere that running the program as root would solve this problem (ie by downloading gksu). Then the command from the proper directory would be: gksudo fslint-gui This also does not solve the problem for me.

    Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.