Let's say you want to edit a package that you download with the package manager. You can actually make it so you have a local copy of the package that overrides what's in your package cache.
- Put this in your Unity project: https://gist.github.com/liortal53/111ee2a659b0d59c80faab0f5d457531
- Right click on the package you want, and press Embed Package
- You now have a copy of the package in your Packages dir
- If you delete that package folder, Unity will automatically switch back to using the package manager version. All references to scripts will stay intact.
Number 2 wasn't clear to me at first. I tried right clicking on the folder in Packages list on the left and "Embed Package" was greyed out. I had to click on Packages on the left and that brought up all the folders in Packages on the right and then I was able to right click on the folder on the right and Embed Package was available.