Sublime Forum

Sublime keeps deleting my "loose" packages

#1

I am currently trying to override some of the settings for a theme I installed through Package Control (packagecontrol.io/). In order to do that I stored the theme files in my “loose” package folder (<data_folder>/Packages) and customized the theme to my liking.

Everything works fine until I restart Sublime. Then all hell breaks loose because Sublime removes everything I manually put in the “loose” folder. The only exception I found to this behavior is putting Default.sublime-theme which stays there even after restart.

I’ve tried reinstalling Sublime from scratch, removing all folders prior to doing that but nothing helps. I know Sublime Text 3 (build 3083) is currently released as Beta but somehow I have a feeling that this is something that is tightly connected to some hidden setting in the application. I love Sublime, even have a license for it, but stuff like this really discourage me from using it more actively :frowning: If it helps I am on Windows 10.

Any help would be highly appreciated.

2 Likes

#2

I actually managed to get help from nice people at Freenode IRC (##sublimetext) which explained to me that leaving package-metadata.json in the loose Package directory will often trigger the “orphaned package” clean-up which was responsible for removing the files. I just removed it and now everything works fine.

0 Likes

#3

Package Control keeps track of what packages it installs with a package-metadata.json and a centralized list in the setting “installed_packages” of the “Packages/User/Package Control.sublime-settings” file.

If you create a new package, or extract a package to a different name, and leave the package-metadata.json file, then Package Control believes it has ownership over the package. It them detects you have not requested that package be installed since it is not in the “installed_packages” setting. It then deletes the “orphaned” package.

This allows people to sync their “Packages/User/” folder across machines and Package Control will sync package removals.

If you are hand-extracting the packages, be sure to remove package-metadata.json. If you are using a tool, please tell the author they need to have their code delete package-metadata.json.

3 Likes

"Package Control: Removed directory for orphaned package"