How to Rebuild Launchpad Database in OS X Yosemite (10.10) and Later

When you run into the situation the icons are weird sorted or like in my situation having folders with items in it when closed but as soon you open the folder the items disappear, you might want to start over and reset the Launchpad.

  1. Launch Terminal, located in the /Applications/Utilities folder.
  2. In the Terminal window, enter the following:
  3. Press enter or return to issue the command.
  4. In the Terminal window, enter:
  5. Press enter or return.
  6. You can now quit Terminal.

Launchpad has now been reset. The next time you open Launchpad, the app will rebuild the databases it needs. Launchpad may take a bit longer than usual to launch the first time, and the Launchpad display will now be in its default organization, with Apple apps shown first, and third-party apps next.

You can now rearrange Launchpad to suit your needs.

 

Source: https://www.lifewire.com/fix-launchpad-problems-in-os-x-2259966