Skip to main content

rekfix

The last-ditch rescue for rekordbox USB sticks. Diagnose, repair, or rebuild the library from it, before anything gets wiped.

Stick acting up, rekordbox offering to "delete the device library", or your library gone? Stop before you click Yes, format the stick or re-export to it. Each of those destroys what exists only on the stick: the play histories from your gigs, cues set on the decks, and, if rekordbox's library is gone, the library itself. Copy the stick off and run rekfix first (the checklist).

A re-export rebuilds the stick from your rekordbox library. That is the usual advice when a stick misbehaves, but it throws away what exists only on the stick: play histories the decks saved, cue points set on the decks, and everything, if the library it came from is gone. It also doesn't help when the problem isn't damage at all. rekfix starts by finding out what's actually wrong.

When the stick is all that's left (a dead laptop, a reinstall, a library that's gone), even a damaged stick, rekfix rebuild gets your library back into rekordbox:

  • every track with its key, BPM and beat grid;
  • the hot cues, memory cues and loops, including ones set on the decks;
  • your playlists, and the play histories from your gigs.

That's how a 13,000-track library came back after its only copy, a rotting stick, failed (the case).

rekfix is an independent project. It is not made, endorsed or supported by AlphaTheta or Pioneer DJ; rekordbox, CDJ and XDJ are trademarks of their owners. It reads the stick's database in a format that isn't officially documented. Its few repairs edit that database in place, after saving a copy, but keep your own backups and test on your decks before relying on a repaired stick.

Install

Python 3.11 or newer, no other packages:

pipx install rekfix

pip install rekfix works too. To run the latest from GitHub: pipx install "git+https://github.com/wolfybird/rekfix", or clone it and run python -m rekfix ....

Start here

  1. Copy before anything else. rekfix snapshot E:\ D:\stick-backups copies the stick's databases (checksum-verified) and writes a list of every file on it. Add --full to copy the analysis files too. Nothing on the stick changes.
  2. Check it. rekfix check E:\ reads export.pdb, the database older players read, and reports anything a deck could trip over. It checks:
    • the database's structure;
    • playlists and play histories that point at missing tracks;
    • tracks whose audio or analysis file isn't on the stick;
    • a root menu that's too heavy for the deck;
    • what an earlier removal of tracks left behind, such as a song count the decks show wrong.
  3. Look up the symptom in docs/playbook.md: what it usually means, how to confirm it, and what fixes it.
  4. If the database is beyond repair, rekfix rebuild gathers everything it can into a rekordbox XML file, to import into rekordbox and export a fresh stick from. Do this before anything wipes the stick.

Last-ditch checklist

When a stick fails before a gig, or it's the only copy of your library left:

  1. Stop. Don't answer "Yes" to rekordbox's "delete the device library", don't format the stick, don't export to it, and don't let a deck write to it. Eject it and set it aside.
  2. Copy everything off: rekfix snapshot E:\ D:\rescue --full (the databases, analysis files and a list of every file), then the Contents folder (the audio). If the stick is failing, copy the most precious things first. Copying is all a dying stick may still allow.
  3. Find out what's wrong: rekfix check E:\ (add --scan if it reports damage) and docs/playbook.md. Often it isn't damage at all: a freezing deck can be a menu setting, a "corrupted" prompt can be a leftover marker.
  4. Repair in place when the playbook says that's safe: menu, prune. Both are dry runs until --apply, and both save a copy first.
  5. Or rebuild when the database is beyond repair or rekordbox's library is gone: rekfix rebuild E:\ library.xml --music D:\rescue-audio. Import it into rekordbox and export a fresh stick, and keep the old stick untouched until the new one has played on your decks.

Commands

command does
check STICK|FILE [--scan] [--second-word] [--tables] health check; --scan reads a damaged file by page instead of by its (possibly broken) header and chains
diff OLD NEW what changed between two copies of export.pdb: rows, pages, playlists, root menu, histories
menu STICK [--hide ...|--show ...] [--apply] the players' root browse menu; hide the categories that freeze older decks on big libraries
prune STICK [--restore-from DIR] [--restore-all] [--apply] remove tracks whose audio is gone from the stick, the way rekordbox removes tracks; keeps (or copies back) any a play history lists
rebuild STICK OUT.xml [--music DIR] [--scan] [--all-audio] recover the library, even from a damaged stick, as rekordbox XML: metadata, key, BPM, beat grids, hot and memory cues, loops, playlists, play histories
clone SOURCE TARGET [--audio-from DIR] [--apply] an exact copy of a stick on another, without rekordbox: keeps deck histories and deck cues, reads every file back, refreshes by copying only what changed
history STICK [--tracks] [--scan] the play histories the decks saved on the stick
snapshot STICK DEST [--full] databases + file list, before you change anything
readtest STICK how fast and evenly the stick reads (Windows: bypassing the cache)

Only menu --apply and prune --apply write.

Before writing, they:

  • refuse if rekordbox is running;
  • refuse to edit a database check finds damaged;
  • save a copy of export.pdb.

When writing, they edit fixed-size fields in place, with the same bookkeeping rekordbox does: page counts and flags, and a new sequence number.

After editing, prune re-reads the result from scratch before saving. It checks that the result is what was planned, and that no byte outside the fields it meant to change is different.

clone --apply writes only to the target stick, and never to the source. It refuses a target that holds another library, too little space, or files FAT32 can't hold. Every file is read back and checked against what was written.

What it's built from

Four real cases on XDJ-1000MK2 decks, written up in docs/cases:

The database format notes, including the traps that cost the most time, are in docs/format.md.

Buy us a coffee

lots of hard work went into the making, testing and refining of these DJ tools. if you're able to do so, buy us a coffee or a drink to thank us, we'd greatly appreciate it! thank you for giving them a try, we hope you enjoy using them and that they inspire creativity and save a lot of trouble. have a good set and happy playing. ~rfrank

Ko-fi · Buy Me a Coffee

Licence

GPL-3.0-or-later, see LICENSE. rekfix is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3 or (at your option) any later version. It comes with no warranty.

Thanks to Deep Symmetry for their documentation of the export format, and to the pyrekordbox project.

Metadata

Release files for rekfix 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rekfix 0.2.0
File Size Uploaded Provenance Actions
rekfix-0.2.0.tar.gz 67.4 kB With provenance Details for rekfix-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rekfix 0.2.0
File Interpreter ABI Platform Actions
rekfix-0.2.0-py3-none-any.whl Python 3 none any Details for rekfix-0.2.0-py3-none-any.whl

Total release size: 128.6 kB

Release files / rekfix-0.2.0.tar.gz

Download URL rekfix-0.2.0.tar.gz
Size 67.4 kB
Tags Source
SHA-256 checksum
How to use checksums
60953fe5c7269b8c2b62fe0ad6ab0c3f15f7d7a2959e81a79c55a531d82994f1
BLAKE2b-256 checksum
How to use checksums
faa97b6a5df6af59a47a6bdb17300faf5716a1b0e9e6dd243ccac0560a905f3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / rekfix-0.2.0-py3-none-any.whl

Download URL rekfix-0.2.0-py3-none-any.whl
Size 61.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9185ef3da0352435f16cb03d81155e4bc2d778c3e57481d30de5a4d05bb2d22c
BLAKE2b-256 checksum
How to use checksums
cc7fb012fe39b8c23168afa87522f4122d2336a9a4892a0d81d69ff7fd66fc15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for rekfix 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rekfix-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page