Firefox bookmarks fail to import on Ubuntu 22.04 LTS because system re-imaging changes the profile directory structure, breaking the link between the browser and its data files. This guide provides immediate workarounds to restore access by locating the old
places.sqlite database and manually restoring it to the new profile folder, ensuring your saved links are recovered without relying on the broken import wizard.
Understanding Profile Isolation in Ubuntu
When you re-image an Ubuntu system, the operating system often creates a fresh user environment or resets configuration directories. Firefox stores all user-specific data, including bookmarks, history, and passwords, in a hidden directory called
.mozilla/firefox/. Each unique installation of Firefox gets a random alphanumeric suffix (e.g.,
xxxxxxxx.default-release) to isolate profiles. If the system re-image generates a new random ID for your profile while leaving the old bookmark data in a previous directory, the import function will fail because it cannot find the source file in the expected location. The browser sees a blank slate rather than a corrupted file, leading to confusion when users attempt to use the standard "Import from Backup" feature.
Locating Your Old Bookmark Database
The first step is to identify where your original bookmark data resides. Even if the current Firefox instance appears empty, the old data likely remains in the filesystem unless explicitly deleted. Open the Terminal application and navigate to the home directory. You need to look inside the
.mozilla folder, which contains one or more subdirectories representing different profile versions. Use the following command to list these directories with their modification dates:
ls -lt ~/.mozilla/firefox/
This command lists the profile folders sorted by time, showing the most recently modified ones first. Look for a folder that has a name similar to your current profile but was created before the re-image occurred. Inside that older profile folder, locate the file named
places.sqlite. This SQLite database contains all your bookmarks and history. If you see multiple candidates, check the
places.sqlite file size; a healthy database with many bookmarks will typically be several megabytes in size, whereas a new, empty profile will be very small.
Restoring Bookmarks via File Replacement
Once you have identified the correct
places.sqlite file from the old profile, you can manually replace the empty file in your current active profile. First, ensure Firefox is completely closed. Then, open your current profile folder, which you can find by typing
about:support in the address bar and clicking "Open Directory" next to "Profile Folder." Navigate back to the terminal and copy the old database file into this active folder using the
cp command:
cp ~/.mozilla/firefox/OLD_PROFILE_ID/places.sqlite ~/.mozilla/firefox/CURRENT_PROFILE_ID/places.sqlite
Replace
OLD_PROFILE_ID and
CURRENT_PROFILE_ID with the actual folder names found in the previous step. It is crucial to overwrite the existing
places.sqlite file in the current profile. After copying, start Firefox again. Your bookmarks should now appear immediately. If they do not, try restarting the computer to ensure no background processes are locking the file. This method bypasses the GUI import tool entirely, solving issues caused by UI glitches or permission errors during the import wizard.
Alternative Recovery Methods
If manual file replacement does not resolve the issue, consider checking for automatic backups. Firefox occasionally creates backup copies of the database in the same directory with names like
places.sqlite.bak or
places.sqlite-corrupt. You can rename the current
places.sqlite to something else and rename the
.bak file to
places.sqlite to restore a slightly older version of your data. For more complex scenarios involving significant data loss, refer to our guide on
Recovering Old Firefox Bookmarks in Ubuntu 22.04 LTS, which details advanced recovery techniques using JSON export files if available. Additionally, if you are migrating to a newer version of Ubuntu, such as 24.04, ensure that your export methods are compatible with the latest browser updates by reviewing
Method to Export & Open URLs in Firefox Window on Ubuntu 24.04.
Preventing Future Import Failures
To avoid this situation in future system updates or re-imaging events, enable Firefox's built-in synchronization feature. By creating a Firefox Account and syncing your data to Mozilla's servers, your bookmarks are stored remotely rather than solely on the local disk. When you log in after a system reset, your bookmarks will download automatically, eliminating the need for manual file manipulation. Furthermore, regularly export your bookmarks to an HTML file through the Library menu. This creates a portable backup that can be imported via the standard interface even if the local profile becomes corrupted. Keeping a local HTML backup ensures you always have a fallback option independent of the profile directory structure.
Frequently Asked Questions
Why does the import wizard show no sources?
The wizard shows no sources because it looks for specific legacy browser data formats in predefined locations, which may not exist after a clean install. Since your data is trapped in an old profile folder, the wizard cannot detect it. Manual file replacement is required to bridge this gap.
Is it safe to delete the old profile folder?
Yes, but only after you have successfully copied the
places.sqlite file to your active profile and verified that all bookmarks appear correctly in Firefox. Deleting the old folder frees up disk space and prevents confusion during future troubleshooting sessions.
Can I recover bookmarks if places.sqlite is missing?
If the
places.sqlite file is gone, you must rely on JSON backups created by Firefox extensions or manual exports. Without these secondary backups, local recovery is impossible. Check your Downloads folder or cloud storage for any previously exported HTML files.
Does this fix apply to Chrome or Chromium?
No, this solution is specific to Firefox. Chromium-based browsers store bookmarks in a different format and directory structure, typically in
Bookmarks files within the
.config/google-chrome directory. Attempting to copy Firefox files to Chrome will result in corruption.
What if my bookmarks appear but are disorganized?
Disorganization usually indicates that the toolbar and menu structures were not included in the
places.sqlite file alone. While the links are present, the folders might be misplaced. You can use the Library view to manually drag items into their correct folders or use a third-party extension to sort them.