Some context menu items cannot be removed without going into the source code. Others are implemented by a nautilus extension. You can remove these by removing these extensions.
In a few cases, these extensions are installed by a dedicated package, like nautilus-extension-gnome-terminal
, which provides the "Open in terminal" context menu. In that case, you can simply remove the package to remove the menu item.
In other cases, the extension is installed while installing a utility, e.g. the "Compres..." option is provided by fileroller
. Removing that package will remove the right-click menu, but will also remove the archiving utility.
Some extensions are installed with the nautilus
package itself.
All these extensions live as files in the /usr/lib/x86_64-linux-gnu/nautilus/extensions-3.0
folder. You can remove these files to remove the right-click functionality they provide, but the risks of directly interfering with system files is of course fully with the user.