You can only remove packages which are not required by another package.
When you remove a package from a project, any Editor or run-time functionality that it implemented is no longer available in that project.
Make sure you understand these important notes before you begin:
To remove an installed package:
Open the Package Manager window and select In Project from the PackagesPackages are collections of assets to be shared and re-used in Unity. The Unity Package Manager (UPM) can display, add, and remove packages from your project. These packages are native to the Unity Package Manager and provide a fundamental method of delivering Unity functionality. However, the Unity Package Manager can also display Asset Store packages that you downloaded from the Asset Store. More info
See in Glossary drop-down menu.
Select the package you want to remove from the list of packages. The details view now displays that package’s information.
Click the Remove button. If this button isn’t displayed, you might be viewing the My Assets list. See Before you begin.
When the progress bar finishes, the package disappears from the list.
If you want to restore a removed package, follow the instructions for installing a package.