Remove a workspace from GNOME Shell
Solution 1
If you have "dynamic workspaces" instead of "static workspaces" enabled, an empty workspace at the top or middle of the list will automatically go away once you switch to another workspace.
But if you have GNOME extensions like "Auto Move Windows" or "Put Windows" enabled, this won't work. These extensions change the dynamic workspace behaviour to only remove empty workspaces at the end, not at the top or middle.
If you disable these extensions, you'll see the intended behaviour.
Solution 2
In Gnome-Tweak-Tool you have the Menu Workspaces. Select Dynamic Workspaces -> Workspaces can be created on demand, and are automatically removed when empty. With this Option when you close the program from Workspace 3, then this workspace will be removed. I hope this will help you.
Solution 3
Install:
$ sudo apt install gnome-tweak-tool
Run:
$ gnome-tweaks
It can also be found in the (Arc) menu under Utilities as "Tweaks".
Set number of workspaces to static 1:
Related videos on Youtube
lonix
Updated on September 18, 2022Comments
-
lonix over 1 year
Sometimes I mistakenly rearrange windows so there is an empty workspace at the top or middle of the list. So I need to move all the windows "up" to get rid of it.
How can I remove a specific workspace?
-
lonix almost 6 yearsI already had that option ticked. But what happens if it's
workspace 1
that becomes empty - does it remove it for you? For me it doesn't, so I have one empty one and then all my windows are in 2, 3, etc. -
lonix almost 6 yearsFound the problem - like you said it was another extension that behaves in that way - put windows. But it's so useful for resizing windows I will learn to live with it's bug!
-
kannzzmm2 almost 6 yearsYes it removes automatically every workspace, when it's empty...
-
lonix over 4 yearsNot relevant to the question. This sets one workspace only.
-
GeorgiaTv over 4 yearsThus removing the empty workspaces.
-
lonix over 4 yearsLol good answer... However, the problem was that there was one unnecessary workspace, but this approach removes all of them. Like your car having one flat tyre, so you remove all the tyres, and say that you solved the flat tyre problem :-)
-
lonix over 4 yearsI like your style though... you go for the nuclear option!
-
GeorgiaTv over 4 yearsInstead of
1
, which is ideal for me, you could set it to the max number of workspaces you need. -
pomsky almost 4 yearsThe question specifically mentions empty workspaces at the top or middle of the list are not being removed automatically.
-
Goutam Hebbar almost 3 yearsI found your approach very useful.
-
Aby almost 3 yearsThanks man, Auto move windows was killing me!
-
Daniel Nalbach over 2 yearsThis was the only way I could find on 20.04 to get rid of unnecessary dynamic workspaces after closing the app that was previously on them. Seems like an X icon to close when hovering over Activities workspaces would be expected, but I guess not. :(
-
Admin about 2 yearsI had "Auto move windows" activated. After disabling it in gnome tweak tool (without logging off and in again), the workspaces still did not disappear. I tried moving a window to the empty workspace and then moved it down, but the WS still kept existing. (Ubuntu 20.04, Gnome Shell 3.36.8)