Remove unnecessary files with Czkawka
File Diet
![© Lead Image © adimas, 123RF.com © Lead Image © adimas, 123RF.com](/var/linux_magazin/storage/images/issues/2021/251/czkawka/adimas_fotolia-file_folders.png/792064-1-eng-US/adimas_Fotolia-File_Folders.png_medium.png)
© Lead Image © adimas, 123RF.com
Czkawka helps find and remove duplicate and obsolete files to free up valuable disk space.
Today's operating systems typically consist of well over 100,000 files, and more files are quickly added during daily work. Many of these added files are temporary files or logfiles. Over time, you might also accumulate duplicate files, configuration files for deleted programs, and the remnants of broken files. Resourceful programmers have developed tools to remove these unneeded files quickly and efficiently. One cleanup tool that is gaining attention with Linux users is Czkawka [1]. According to the project developers, Czkawka will help you discover and delete:
- Duplicate Files: Finds duplicates based on file name, size, hash, and a hash of just first 1MB of a file
- Empty Folders: Finds empty folders with the help of an advanced algorithm
- Big Files: Finds the biggest files in given location
- Empty Files: Looks for empty files across the drive
- Temporary Files: Finds temporary files
- Similar Images: Finds images that are not exactly the same (different resolution, watermarks)
- Zeroed Files: Finds files that are filled with zeros (usually corrupted)
- Same Music: Searches for music with the same artist, album, etc.
- Invalid Symlinks – Shows symbolic links that point to nonexistent files/directories
- Broken Files: Finds files with an invalid extension or that are corrupted
Czkawka, which gets its name from the Polish word for hiccup, is available in a GUI variant and as a command-line tool. The GUI variant is based on the GTK libraries.
Installation
At this writing, Czkawka is only available in the repositories of OpenMandriva Cooker; for all other distributions, you need to install manually. A Snap package allows for quick integration into distributions that support Snap; Czkawka is also available as a Flathub package and an AppImage.
On the project's GitHub page, you will also find two generic packages, the source code, a Docker image, and installation instructions for various distributions. The project also maintains an unofficial PPA for Ubuntu and Debian-based distributions [2].
Interface
When you first start Czkawka, a somewhat confusing program window opens. The complexity of the GUI is your first indication of the large feature set and massive number of options (Figure 1).
![](/var/linux_magazin/storage/images/issues/2021/251/czkawka/figure-1/792067-1-eng-US/Figure-1_large.png)
The parameters are organized in tabs. After the launch, you'll see the Included Directories box at the top of the dialog. Select the directories you want to clean up. You can add more folders by pressing the Add button.
By default, the software lists the current directory of the logged-in user. To the right, you can define whether the tool searches for files in the specified directories recursively (i.e., including files found in subdirectories within the directory tree). Manual Add lets you specify a path for a directory without the detour via the file manager.
Click the Excluded Directories tab to define directories you want to exclude from search and delete operations. The exclusion list already contains numerous system folders. You can manage this list with the buttons to the left.
The Excluded Items tab lets you specify criteria for excluding files that you want the program to ignore. Entries are mostly recursive; asterisks serve as placeholders.
In the Allowed Extensions tab, enter file extensions that you want to include in the search. Separate multiple extensions by commas. In addition, the software lets you define entire file types, such as IMAGE or VIDEO, using an integrated macro.
Further down, you can enter additional criteria. Czkawka presents several tabs with options in a vertical arrangement on the left margin. For example, you can search for duplicates by clicking Duplicate files on the left. Set the minimum size of the duplicates and the check method. You can choose to list matching files by hash values, file names, or file size. However, the program only lets you select one option; the combination of Size and Name, for example, does not work.
The application searches the specified folders after you click Search in the lower-left corner. Note that if you enter the root directory (Figure 2), the software will search the entire partition and the check could take a long time, depending on the speed of the disk.
![](/var/linux_magazin/storage/images/issues/2021/251/czkawka/figure-2/792070-1-eng-US/Figure-2_large.png)
In the list of duplicates, you will see the file size and path. The tool also gives the disk space occupied by the duplicate versions. At the bottom of the window, you can see a table with warnings that the program logs. For example, if you enable all folders to search for duplicates, but you are operating under user privileges, the log will tell you that the tool cannot open system directories. To hide and show the log, click the hamburger menu at the bottom right of the program window.
Use the buttons below the table to determine what the software does with the files that match the criteria. Select an entry to open a context menu with different options.
You can delete the items by pressing Delete (Figure 3). It is also possible to save the results from the table as a text file using the Save button.
![](/var/linux_magazin/storage/images/issues/2021/251/czkawka/figure-3/792073-1-eng-US/Figure-3_large.png)
General
To access general configuration settings, click on the button with a symbolized caliper at the top-right of the program window. You can now define how the software handles changed options, whether it moves the files to be deleted to the recycle bin instead of deleting them directly, and whether it displays reduced images of the contents of image files.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.