How to update Dock preview to Applications folder after hiding apps with chflags I am using chflags hidden method to hide apps in /Applications folder. 

It immediately hides the application in Finder, but when I click on the Applications folder in Dock (image below), I can still see the hidden applications there, until I restart the computer.

So the question is: Is it possible to also update the visibility of the application in the Dock preview to Applications folder without restaring the computer?
I tested it and doing killall Dock in Terminal.app does the job.


  This specific killall command will essentially restart Dock and therefore the Applications folder preview gets updated as well.






Alternatively you can open /Applications/Utilities/Activity Monitor.app search for Dock, select it and click the X in the top left corner of the window.