TL;DR version
Reinstalling Sublime has no effect on the packages that you have manually installed because all of your customizations to Sublime (including packages that you install yourself) are stored in a folder in your home directory.
Based on your problem description, the steps you want are something like the following:
- Use
Sublime Text > Preferences > Browse Packages...
from the menu to open the Packages
folder, then copy everything out of it into another location to make a backup.
- Quit Sublime Text, then delete everything but the
User
package from the Packages
folder
- Delete
Sublime Text.app
and reinstall Sublime
- Start Sublime Text
What this is going to do is make sure that anything that you might have done inside of the Sublime Text.app
directory is undone. This is safe because this directory has “no user-serviceable parts inside”; all of your customizations happen in the Packages
folder because this folder is replaced when you upgrade Sublime (and is why reinstalling Sublime when you’re having problems rarely has any effect).
Secondly, the User
package is where all of your customizations to Sublime are kept (preferences, key bindings, etc). One of the things stored here is the Package Control settings file, which contains the list of packages that you’ve installed via PC. PC will automatically reinstall any packages that might be missing due to #2 above as well as their dependencies (if any). Most packages are installed as sublime-package
files, so likely not too many are missing.
That should get you back into a fairly clean state. If you had any packages that you installed manually, you can pull their folders out of the backup you made in step #1 and put them back into the Packages
folder. Most of the contents of your backup is the extracted contents of packages that you don’t want (which is why it’s easier to remove them all wholesale and have PC put what should be there back rather than trying to clean it up manually).
If you had any overrides that you created yourself, you will need to pull those individual files out of the backup and put them back in their respective packages to put the override back in place.
Longer “What Happened?!” version
For background, packages in Sublime can exist in three different places:
-
Inside the folder named Packages
, as folders where the name of the folder is the name of the package. You can use Preferences > Browse Packages
to find this location.
-
Inside of a folder named Installed Packages
, which is a sibling of the above folder, and in this folder packages are sublime-package
files (zip files with a changed extension).
-
Inside of a folder named Packages
in the location where Sublime Text is installed. These are Shipped Packages
because they ship with Sublime (i.e. they’re common to everyone), and are also sublime-package
files.
If a package is represented in more than one of these places at once, you have what is called an override
in place, which means that Sublime is going to ignore one file and use the other.
-
If a sublime-package
appears in the Shipped
location and in the Installed Packages
folder, the shipped version is ignored and Sublime pretends that it doesn’t exist and uses the other one instead. Doing this is pretty rare.
-
If a folder appears in the Packages
folder, any files in it are considered as part of the sublime-package
file with the same name but if any files in the folder have the same name as a file in the sublime-package
file, Sublime will use that file and ignore the one in the sublime-package
file.
This mechanism is the way you modify files in a package, because sublime-package
files are replaced completely when they are upgraded, which would remove any changes that you might make to them directly.
Also worth noting that when you have overrides in place like this, Sublime uses them with no warning, including if the sublime-package
file gets updated.
The default color schemes are Shipped
packages, so it sounds like you did this in the Packages
folder in the Sublime install folder. Sublime only loads sublime-package
files from that folder, so any other files are ignored. You can safely remove anything inside of that folder that’s not a sublime-package
file; they’re not doing anything.
This particular package command is one of the most destructive things you can do to your Sublime Text installation, and I’m surprised that it hasn’t been removed from the package or at least doesn’t have some sort of warning confirmation. I generally keep an override
in place that removes it from the command palette to make sure that I don’t trigger it accidentally.
The reason is that it extracts every file from every sublime-package
file into a folder in the Packages
folder. From the background above, this means that by doing this you immediately create an override
on every file in every package.
Since Sublime loads those files in preference to the ones inside of the sublime-package
version, all updates to your packages are now effectively blocked in perpetuity, without warning, and is why Package Control warns you if it’s installed in two places at once.
Cleaning that up is a bit of a mess because some packages are always installed unpacked in the Packages
folder while others are installed as sublime-package
files instead. Package Control installs dependencies for your packages as folders in the Packages
folder, and you might have a couple of overrides that you made on purpose.
Now’s the point where you skip up to the top of this long post to see the steps to take in order to resolve the problem and put things back as they were because this thing is pretty long as it is.