I made this post on /r/Jailbreak, but I love JB hub so I'm posting here too!
Hello! Today I am excited to introduce OSRestoreX, an on-device alternative to semi-restore for iOS 10 built by /u/nathanaccidentally, /u/ipad_kid, /u/changemylife99, and /u/thebeastgamer25. Thanks so much to JailbreakHub for hosting the tweak and for being so cool!
#How does it work?
Well thanks for asking! OSRestore works by using Coolstars stashing method to move all tweaks to /var/db/stash (user storage) so it can remove all your tweaks in 'one swing'. On install, stashing is triggered by installing and/or re-installing a package to get it to enable so all your tweaks are stashed and moved to a static location we can remove.
It will then remove the .installed_yaluX file from the root directory so Yalu will start from scratch when you run it again.
OSRestore then will remove all folders in /var/mobile/, pretty much destroying all the user-created data. OSRestore will rebuild this directory and all its subfolders once you run 'Erase all Contents and Settings' later on.
It will then continue to remove most folders except for the ones needed by the system from /var/mobile/Library/. This should safely remove all user set settings and stuff from your device (also rebuilt when running 'Erase All Contents and Settings').
Next, it will remove mobilesubstrate from the device, this should stop any faulty or corrupted DRM from affecting the system, and it should have dpkg take care of any leftover files from other tweaks.
Then, it will uninstall dropbear and its daemons and prevent them from being falsely loaded.
Lastly, it will try its best to remove most popular Jailbreak apps from /Applications. For this removal, it just removes some popular JB apps for now. We have deemed this safer than the 'guess' method we use for /var/mobile/Library. The apps included for now are Activator, Anemone, BatteryLife, and CocoaTop.
For the last few steps it will remove small things like Cydia.log and flush.log if you have mDNSFlush installed. This will also remove any themes installed to /Library/Themes.
For the very last step, it will remove Cydia.app. Right after this you will be told to immediately go to the Settings app and 'Erase all Contents and Settings'. This will complete the semi-restore.
#Where Can I Get it?
It is currently available in either an on-install version, or a Terminal/SSH version from https://repo.jailbreakhub.org/. Thank's to Jailbreak Hub for hosting the tweak! Check out https://www.jailbreakhub.org
The on-install version will run as soon as the package install starts, while the terminal version can be run at a later time from terminal by running 'osrestore'.
I will continue to keep OSRestoreX updated to the best of my abilities. In each update, I will try to remove more unnecessary files to get as close as I can to a full restore.
Again, big thanks to /u/ipad_kid for working on this tweak with me and thanks to Jailbreak Hub for hosting!
Please report any issues. Thanks!