Getting rid of "ghost windows" in Firefox

The other day there was some sort of crash and when I restored sessions in Firefox I ended up with multiple “ghost windows” like this:

image

One of those is a real window I can select and go to. If I select the other one it just leaves Firefox.

I can’t select it and “remove window” from the menu.

Anybody know how I can get rid of these ghost windows? It would be nice to just delete the ghost windows and leave the others, but I guess I can get rid of them all and recreate them, so long as I don’t lose all my bookmarks.

I asked ChatGPT but its suggestions weren’t helpful.

Thanks.

In Firefox, If you go to Tools > Browser Tools > Task Manager, you should get a tab (about:processes) with list of all the tabs and background processes that Firefox is running, generated from Firefox itself.

There should be an X if you hover your mouse over the rightmost column next to both the tabs and their underlying background processes. (The ones that correspond to tabs should be prefixed with “Tab:”, the ones that are just URLs are the background processes.) If you click the X next to the “Tab:” entry it should close the corresponding tab (and the window it contains if that tab is the last one in the window.)

It should work even on invisible windows.

2 Likes

I had a similar problem with Firefox holding on to previous windows in the Window Menu even after restarts of broswer and Mac.
But I just checked its Task Manager as @Incompatible suggested and whoa, I wish I’d known about that before!
I’m not seeing the issue now but have switched primary Macs and have a later version of FF.
Hope that’s your solution @doug2 !

Wow! It took a while to go through them and figure out which were the invisible ones (in the task manager you can double-click on them to go to them if they exist) and delete them all, but my windows finally look correct with no ghost windows for the first time in days. Many thanks!