How to remove duplicate entries in dash?

In Dash, applications are represented by .desktop files. These files are located in either /usr/share/applications or ~/.local/share/applications. For snap programs, also look at /var/lib/snapd/desktop/applications

What you see in Dash is not the filename of these .desktop files, but the (application-) name that is defined in the Name= line, inside the file.

When you have duplicate appearances of the same application in Dash, it almost certainly means that you have desktop files in either /usr/share/applications or ~/.local/share applications (or even the snap folder) with a different file name, but representing the same application, and with the same Name= line.

This is for example the result when I copy the gedit.desktop file, rename it to monkey.desktop and copy it into /usr/share/applications:

enter image description here

In your case it is probably the result of installed new versions of applications you already had installed, these new versions install new .desktop files, but with a slightly different (file-)name.

What you should do is look inside both directories, find these "almost duplicate" .desktop files, remove the oldest and keep the latest.

Some more information

From the two locations: /usr/share/applications and ~/.local/share/applications, the latter takes precedence. If two .desktop files with the same filename exist in both directories, the local one shows up in Dash (if just copied, it takes a logout / login). That is why it is normally good practice to first copy a .desktop file to the local directory (to add items to the launcher's quicklist for example) before editing, and leave the global one untouched.

If you install a newer version of some software, and the newly installed .desktop file name differs from the old one (and the old one is not removed for some reason), the application will have multiple occurrences in Dash. The same happens when the .desktop file is replaced, but people forget they have a local (edited) version of the .desktop file.