Why convert LOCKB to LOCK?
Bun 1.2 replaced the binary bun.lockb with a text-based .lock (bun.lock, a JSONC file) because binary lockfiles are impossible to review in pull requests, hard to merge, and unreadable by external tooling like Dependabot.
How to convert LOCKB to LOCK
Bun (save-text-lockfile) FREE
With Bun 1.2+, run bun install --save-text-lockfile --frozen-lockfile --lockfile-only, then delete bun.lockb. Bun generates bun.lock from the existing binary file, keeping resolutions and metadata.
Bun (plain migrate) FREE
Simply running bun install --save-text-lockfile also migrates an existing bun.lockb to bun.lock, updating dependencies at the same time.
About these formats
A .lockb file is Bun's binary install lockfile, almost always named bun.lockb. Bun writes it when you run bun install to pin the exact versions and integrity hashes of every dependency so…
Open .LOCKB details →A .lock file is a marker that a program is actively using a file, database, or profile. It is usually empty or holds a tiny text note such as a process ID. You do not open or edit it. If an…
Open .LOCK details →Quality & what to watch
- The
--frozen-lockfile --lockfile-onlyflags keep your resolutions unchanged; omitting them lets Bun update dependencies during the migration. - You must delete
bun.lockbyourself afterward - Bun does not remove the old binary file automatically. - This requires Bun 1.2 or newer; older Bun releases cannot write the text lockfile.
Frequently asked questions
What is the difference between bun.lockb and bun.lock?
bun.lockb is the old binary lockfile; bun.lock is the newer human-readable text (JSONC) lockfile introduced in Bun 1.2.Do I lose any data in the migration?
bun.lockb and preserves resolutions and metadata in bun.lock.