Find and Remove File Duplicates in Linux Mint

Today we will see how to find and remove file duplicates in Linux Mint. This is a very commonly required task for anyone who stores a bunch of photos, documents and other files in various locations. Over time, several copies of the same file can accumulate because you don't want to change the originals. Here is how you can find and remove duplicate files.

In Linux, there are several ways to find file duplicates. But the most useful tool is fdupes, a console app. Don't be scared with the command line; it is very easy to use this application. In Linux Mint, you can install it from the default repository, no external PPA or software source is required.

To find and remove file duplicates in Linux Mint, do the following.

  1. Open main menu and go to Administration - Software Manager.
    Enter your password to continue with Software Manager.
  2. In Software Manager, type fdupes in the search box and press the Enter key:Click the fdupes search result and install it.
  3. Now, go to the folder where you want to find duplicates in. Open Terminal in that folder.
  4. To find file duplicates, type the command
    fdupes -r ./

    The -r switch tells the app to go through subdirectories. The ./ portion makes the app find duplicates in the current folder.
    So, the whole command means "find file duplicates in the current directory and its subdirectories".
    In the output, you will see all file duplicates:

  5. To find and delete file duplicates, type the following command:
    fdupes -r -d ./

    The additional switch -d tells the app to ask the user which files he wants to retain on the drive and which files should be removed. This is how it looks in action:

    For each set of file duplicates, the app shows a list of files and asks which file to keep.

Fdupes is a reliable and easy to use application which allows you to keep your files organized and recovers valuable drive space. It supports a number of other options which you can find in its manual page. In the terminal app, you can type the command man fdupes to learn about them.
These are worth mentioning:
-S --size - use this switch to print out the size of duplicate files.
-s --symlinks - follow symlinked directories
-H --hardlinks - normally, when two or more files point to the same disk area, they are treated as non-duplicates. This option will change this behavior.
-m --summarize - summarize duplicate file information.

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

3 thoughts on “Find and Remove File Duplicates in Linux Mint”

  1. Thank you for this and other articles on Linux. I have Mint installed but actually switching over completely from Windows is easy to postpone one day at a time because of the countless routine things I need to research before I can do everything I’m used to doing. Your help is greatly appreciated.

    I’ve turned off ad blocking even though some of your ads don’t make me happy. ;) It’s the least I can do.

    1. Thank you Jozsef
      I really appreciate your move.
      Btw, you can ask me any question regarding Linux here in the comments or via email. I will try to be of help.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.