cleanup_digikamdb − Cleanup the digiKam databases to reduce their sizes and increase access speed


cleanup_digikamdb [-t] [-T] [-p] [-h]



Include thumbnail databases.


Only cleanup thumbnail databases.

−p path

Specify a different database path. If this option is not set or the specified path is invalid, the entry from the configuration file will be used.


Show command line options.


cleanup_digikamdb will cleanup and optimize the digiKam database file. This will, in most cases, lead to a smaller database file size and an increased access speed, because unneeded elements are removed from the database and data is optimized.

The program will make sure that no instance of digiKam is running, because it is more safe to have no database access during the optimization process. It then will read the digiKam configuration file and determine the database location. In a final step the database will be optimized by invoking the sqlite command ’VACUUM;’ on it. If more then one database is found in this location, cleanup_digikamdb will optimize every database found in this path and below.

For further explanation, see the following description of the VACUUM command from the sqlite3 website:

When an object (table, index, or trigger) is dropped from the database, it leaves behind empty space. This empty space will be reused the next time new information is added to the database. But in the meantime, the database file might be larger than strictly necessary. Also, frequent inserts, updates, and deletes can cause the information in the database to become fragmented - scrattered out all across the database file rather than clustered together in one place.

The VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy. This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure.


cleanup_digikamdb was written by Andi Clemens <andi dot clemens at gmail dot com>

More Linux Commands

perlapio(1) - perl's IO abstraction interface. (Man Page)...
Perls source code, and extensions that want maximum portability, should use the above functions instead of those defined in ANSI C s stdio.h. The perl headers (

perl5122delta(1) - what is new for perl v5.12.2 (Man Page)
This document describes differences between the 5.12.1 release and the 5.12.2 release. If you are upgrading from an earlier major version, such as 5.10.1, first

lsetxattr(2) - set an extended attribute value (Man Page)...
lsetxattr.2 - Extended attributes are name:value pairs associated with inodes (files, directories, symbolic links, etc.). They are extensions to the normal attr

tset(1) - terminal initialization - Linux manual page.......
Tset initializes terminals. Tset first determines the type of terminal that you are using. This determination is done as follows, using the first terminal type

halt(8) - Halt, power-off or reboot the machine (Man Page)
halt.8 - halt, poweroff, reboot may be used to halt, power-off or reboot the machine. OPTIONS The following options are understood: --help Print a short help te

XdbeFreeVisualInfo(3) - frees information returned by XdbeGe
This function frees the list of XdbeScreenVisualInfo returned by the function XdbeGetVisualInfo(). SEE ALSO DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(),

lsdiff(1) - show which files are modified by a patch........
List the files modified by a patch. You can use both unified and context format diffs with this program. OPTIONS -n, --line-number Display the line number that

intro.5 - intro(5) - Introduction to file formats - Linux manual page
Section 5 of the manual describes various file formats and protocols, and the corresponding C structures, if any. NOTES Authors and copyright conditions Look at

console(4) - console terminal and virtual consoles (ManPage)
A Linux system has up to 63 virtual consoles (character devices with major number 4 and minor number 1 to 63), usually called /dev/ttyn with 1 &lt;= n &lt;= 63. The c

cyr_df(8) - report Cyrus spool partition disk space usage...
Cyr_df examines the Cyrus spool partitions and reports on their disk space usage. Cyr_df reads its configuration options out of the imapd.conf(5) file unless sp

gitcore-tutorial(7) - A git core tutorial for developers....
This tutorial explains how to use the core Git commands to set up and work with a Git repository. If you just need to use Git as a revision control system you m

toc2cddb(1) - translates a TOC file of cdrdao(1) into a cddb
toc2cddb translates a TOC file of cdrdao(1) into a cddb file and prints it to stdout. OPTIONS -h Shows a short help message. -V Prints the version of toc2cddb.

We can't live, work or learn in freedom unless the software we use is free.