iRiomenn wrote:
Unfortunatelly, it didn't work. The Dock keep showing the recent apps, the number of which is 10 right now.
That Terminal command was one meant to add a Recent Items menu to the Dock. I remember seeing it in another thread where someone complained that they had added their own Recent Items menu to the Dock in this way, but that it was no longer working since they upgraded macOS.
Even after looking at man defaults, I'm not sure of the right syntax to reverse it. (It modifies a persistent-others array that contains the Dock's Applications and Downloads menus. You'd only want to remove the extra entry in the array – not everything in the whole array.)
----------
The file that contains the Dock preferences appears to be com.apple.dock.plist in the user-level Preferences area (an area that Finder has been hiding from users for many years now).
Xcode has a property list editor that understands the structure of .plist files. If you knew what you were doing and had Xcode installed, you could use it to remove the extra entry (from running that Terminal command).