How to disable spaces? There is only one thing I hate on macOS (Sierra) since this was created.

I open an application and work on it.

I click on another application on the dock and the whole screen slides to the right and I see that app.

I click on the first application on the dock and the whole screen slides to the left.

For heaven's sake. How do I disable this? If I want to slide I go to an ice rink.

I have already typed that on terminal and restarted the machine

defaults write com.apple.dock mcx-expose-disabled -bool true


and this hateful thing continues.

I want to disable spaces, mission control and for that matter launchpad too and all other things like that.
If you have multiple spaces, you can delete them by exposing the Spaces (by default, Control-Up arrow), and then hover over one of the spaces with your mouse pointer. After a moment, you should see a round (X) appear in the upper left corner. Click and it will delete the space, repeat until you have only one left.

If you find that when you launch an app a space comes back, right-click on the App's icon in the dock, and look under the "Options >" menu. There may be a checkmark beside "This desktop." If so, selecting "None" and then closing the Space like before should stop that.

Edited based on comments: Mission Control does need to be re-enabled first. In the terminal, type

defaults delete com.apple.dock mcx-expose-disabled


and then

killall Dock


And wait for the dock to reload. Then, clear the unwanted spaces (or all of them!) and re-disable Mission Control.