Creating and immediately restoring a Portable Company File (.QBM) shrinks an oversized QuickBooks Desktop .QBW database without deleting a single transaction. When QuickBooks restores a .QBM, it exports only active accounting records and rebuilds every internal table and index from scratch—stripping out empty pockets and database fragments that accumulate over time. Keep in mind that this shrinkage is temporary: the .QBW file will slowly expand again as you record new daily activity.
Fast-Fix: The 45-Second Solution
Back up first, then create and restore a
.QBM. Switch to Single-User Mode, run Verify Data, save a full.QBBbackup, then go to File > Create Copy > Portable Company File. Immediately restore it via File > Open or Restore Company > Restore a portable file to rebuild a smaller, defragmented.QBWdatabase.
Why a .QBM Shrinks Your Database—and Why It Is Temporary
Over months of creating, editing, and deleting invoices, bills, and audit trail entries, your .QBW file builds up internal empty space and scattered database indexes. Even if your business stops growing, that dead space keeps your .QBW file larger and slower than necessary.
- What
.QBMfixes: Exporting to a.QBMand restoring it drops dead space, compacts internal tables, and resets DB File Fragments cleanly without altering financial reports or deleting history. - What
.QBMdoes NOT fix: It does not delete old transactions, reduce list item counts, or permanently stop file growth. As users save new transactions and audit entries, internal slack gradually returns—which is why.QBMcompaction is a temporary maintenance reset rather than a permanent substitute for Condense Data or starting a new file.
For more on how fragments slow QuickBooks down in the first place, see Database Fragments: How to Audit and Fix Fragments That Slow You Down.
Critical Warnings Before You Restore a .QBM
A Portable Company File is not a complete backup. Before restoring a .QBM over or alongside your working company file, protect these items:
- Always create a full
.QBBbackup first: A.QBMomits custom invoice templates, logos, QuickBooks Letters, Spelling Dictionaries, Fixed Asset Manager data, your.TLGtransaction log, and your Document Center attachments (Attachfolder). If you carelessly replace your entire working folder without a.QBBbackup, you can lose those extras. Learn the exact differences in Restore Guide: The Difference Between Restoring .QBB and .QBW Files. - Run Verify Data before creating the
.QBM: A.QBMbuilt from a damaged.QBWfile will often fail during restore. - Never overwrite your original
.QBWblindly: Save the restored.QBWwith a clear name or rename your original file (for example, adding_PRE_QBM) after verifying the restored numbers.
Step-by-Step: How to Shrink Your .QBW File with .QBM
Step 1: Record Your Baseline Size and Run Verify Data
- Open your company file, press F2 (or Ctrl + 1), and note your current File Size and DB File Fragments. See F2 Screen Secrets: Using the Product Information Screen for Diagnostics if you are unsure where to look.
- Have all other users sign out and switch to Single-User Mode (
File > Switch to Single-user Mode). - Run File > Utilities > Verify Data. If QuickBooks finds errors, run Rebuild Data before proceeding.
- Create a full local
.QBBbackup (File > Back Up Company > Create Local Backup) and store it safely.
Step 2: Create the Portable Company File (.QBM)
- Go to File > Create Copy.
- Select Portable company file and click Next.
- Save the
.QBMfile to a local folder (such as your Desktop) with an obvious name likeCompany_Compact.qbm. - Wait for QuickBooks to finish compressing and verify the prompt confirming the
.QBMwas created.
Step 3: Restore the .QBM into a Clean .QBW
- Go to File > Open or Restore Company.
- Select Restore a portable file and click Next.
- Browse to your
.QBMfile on the Desktop and click Next. - Choose where to save the newly rebuilt
.QBWfile—do not overwrite your only original.QBWyet. Either save it into a temporary test folder first, or rename the original.QBWin your working folder toCompany_OLD.qbwand restore the.QBMunder your standard filename so your existingAttachfolder and templates remain in the same directory. - Let the restore finish without interrupting it.
Step 4: Verify the Compacted File and Reset Your .TLG
- Open the restored
.QBWfile and press F2 to confirm your File Size and DB File Fragments dropped. - Run File > Utilities > Verify Data and compare a Balance Sheet and Profit & Loss report against your pre-QBM numbers to confirm every balance matches.
- Check that custom invoice templates and attached documents open normally.
- Run one fresh local
.QBBbackup (Create Local Backupwith Complete Verification) to generate a clean matching.TLGfile—see .TLG File Fix: How to Truncate Transaction Logs to Boost Performance.
What If .QBM Fails to Restore or Barely Shrinks the File?
- If the
.QBMrestore throws an error: Go back to your original.QBW(or.QBBbackup)—your live data is untouched. Troubleshoot the failure with Portable Files: How to Fix .QBM Restore Failures in QuickBooks Desktop. - If the file shrinks very little: Your
.QBWsize is driven by actual transaction volume and audit trail records rather than empty pockets. Consider summarizing older closed periods using Condense Data Guide: How (and When) to Condense Your QuickBooks File, or starting clean with File Migration: A Step-by-Step Guide to Starting a New QuickBooks File.
Final Safety Reminder
Keep your pre-QBM .QBB backup archived for at least a few weeks after switching to the compacted .QBW file. As long as you verify your financials right after the restore and never interrupt QuickBooks mid-write, using a .QBM is one of the safest maintenance resets available in QuickBooks Desktop.