🤔 How it works
💾 Installation / How to use
🔧 Troubleshooting
🤷♂️ Why it was created
🗒️ Additional Notes
Named after the amazing Bulk Crap Uninstaller, BLCU is a simple Python script which deletes any BONELAB mods that you have not subscribed to.
If you're a Fusion player, and you have "Keep Downloaded Mods" enabled, you probably know the pain of having 50-100GB of mods, and have been daunted by the task of individually deleting each folder one by one... luckily, BLCU fixes that!
Important
THIS IS NOT A MOD MANAGER FOR BONELAB!! This is made for removing unnecessary mods you don't need! Sorry, but dem's da rules!
By configuring BLCU to use your OAuth2 token, it will log into your account and grab your current subscriptions and place them in a file called subscriptions.json. This file holds the mod ID and mod name for every single subscription you have.
Tip
If you don't trust BLCU to have access to your account (even if it's only looking at your subscriptions), then create a read only OAuth2 token. This ensures that the BLCU will not have the ability to edit anything on your account (e.g. adding and removing subscriptions).
This part of BLCU will look in your mods path (which is defined in a file pop-up when starting BLCU for the first time), find .manifest files, then look through the files to find the mod's "barcode" and "modId" which is then logged into a file called installedMods.json. This is repeated for all mods.
Note
I don't actually know if these files were generated by notnotnotswipez' ModioModNetworker or not, so if you don't have .manifest files in your mods folder, then try and install it. The instructions to install it are on the Thunderstore page for ModioModNetworker.
This is the main functionality of BLCU, which is both simple and terrifying at the same time, haha. This part of BLCU will look through your installed mods and subscribed mods by their IDs, and find out which mods are not matching. After that, it will confirm with the user to make sure if they want to delete the listed mods, printing out all of the mods that are going to be deleted in a text file called modsToDelete.txt.
Warning
I am not responsible for mods that have been deleted that was already selected to be deleted by BLCU. If you aren't sure about deleting certain mods, then refer to the generated modsToDelete.txt file and find which mods you want to delete via their barcode.
After the user confirms that they want to delete the mods, it will then select a mod to be deleted (which is displayed on the modsToDelete.txt file) individually, and delete it's respective folder and .manifest file.
- Python 3.13+
- Tkinter
- If you're on Windows, it should come preinstalled with Python.
- If you're on Linux, you might have to install Tkinter using
sudo apt install python3-tk(on Debian based distros)
-
Clone this repository by clicking on the green "Code" button at the top of the screen, and clicking "Download ZIP". Alternatively, you can download the same zip by clicking here: Download ZIP
-
Extract the contents of the ZIP folder and ensure all of the files are within a folder of some sort.
-
If you're on Windows, open a terminal by typing cmd on the address bar of File Explorer. If you're on Linux, open a terminal for your distribution (e.g. GNOME Terminal, Konsole, etc.) and type
cd ~/Downloads/BoneLabCrapUninstaller-main. -
Type
python3 -m venv venvto create a virtual environment. While a virtual environment is not strictly necessary, it is recommended to avoid conflicts with system packages. -
Activate the virtual environment:
- On Windows, type
venv\Scripts\activate - On Linux, type
source venv/bin/activate
- On Windows, type
-
Install the required packages:
pip install -r requirements.txt
-
While in the virtual environment, run BLCU by typing:
python main.py
-
If it's your first time running BLCU, it will ask for a directory to scan for mods. Go to the correct directory and select it.
- On Windows, this is usually located in
C:\Users\<YourUsername>\AppData\LocalLow\Stress Level Zero\BoneLab\Mods. If you can't see the AppData folder, make sure you have enabled "Show hidden files" in your File Explorer settings. - On Linux, this is located in the same storage device where the game is installed. If you have installed the game on your main drive, it should be in
~/.local/share/Steam/steamapps/compatdata/1592190/pfx/drive_c/users/steamuser/AppData/LocalLow/Stress Level Zero/BONELAB/Mods/.
- On Windows, this is usually located in
-
After the directory is selected, it will then ask for your OAuth2 token.
- If you don't have an OAuth2 token, you can create one by going to the Mod.io API Access page and creating a new token. Make sure you read and accept the API Terms before doing anything, as misuse of the API can result in your token being revoked, and your account potentially being banned. Once done, name your token anything you'd like, select "Read" from the dropdown box, and click the plus icon. A popup should appear with your token. Copy the token and paste it into the prompt.
Caution
Make sure you do not share your token with anyone else -- it is quite literally a password that can be used to access your account. BLCU will never distribute your token to anyone else (not even me), and will be stored inside the user.json file only. This token is also never shown to you again after you create it, so make sure you copy it into the terminal when asked.
-
After entering your token, you should be greeted into a menu with a list of options. If your token is valid, you should be able to see the program greeting you with your Mod.io username.
-
In the terminal, type
1and press enter to scan for subscribed mods. You should be able to see the total amount of mods found, along with BLCU scanning for pages. This is due to Mod.io's API limit, which caps the number of mods to 100 per page. -
After the scan is complete, you should return to the main menu, which now shows the total number of subscribed mods in green text instead of "No subscribed mods found." in red text.
-
Next, type
2and press enter to scan for installed mods. This should be faster than the previous step. -
After the scan is complete, you should return to the main menu, which now shows the total number of installed mods in green text instead of "No installed mods found." in red text.
-
Finally, type
3and press enter to delete unsubscribed mods. BLCU will calculate the total size of mods to be deleted and prompt you for confirmation before proceeding. Ensure that you read the prompts carefully before confirming deletion. There will be a file that is generated calledmodsToDelete.txt, which is a list of all mods that will be deleted. It is highly recommended that you review this file before proceeding with deletion, as I am not responsible for any mods that were listed and consequently deleted. -
After typing Y and pressing enter, BLCU will begin deleting the unsubscribed mods. You should see progress updates in the terminal as each mod is deleted. Once the process is complete, you will see a summary of the deleted mods and the program will exit.
If you encounter any errors related to the Mod.io API, please check the following:
-
Token Validity: Ensure that your OAuth2 token is still valid and has the necessary permissions to access the Mod.io API.
-
Rate Limits: Mod.io enforces rate limits on API requests. If you exceed these limits, you may receive errors. In this case, please wait for a while before trying again.
-
Network Issues: Check your internet connection and ensure that there are no firewall or network issues blocking access to the Mod.io API.
If you need to generate a new OAuth2 token, then you can either delete user.json and restart installation, or you can replace the old token in user.json with a new one.
If you encounter any errors related to the mod path, please check the following:
-
Mod Installation: Ensure that the mods are installed in the correct directory as specified in the configuration.
-
File Permissions: Check that the script has the necessary permissions to access the mod files.
-
Mod Structure: Verify that the mod files have the correct structure and are not corrupted.
If you have moved your mods to a different directory, please update the configuration file accordingly. Do not delete your user.json file, as it contains your OAuth2 token.
My brother in christ, just reinstall the mods. I gave like 50 warnings about it lmao
The reason why I made this program is because I use a code/Thunderstore mod for BONELAB called ModioModNetworker (created by notnotnotswipez), which does have an "uninstall all unsubscribed mods" option, but it doesn't work. Someone brought up this issue in his Discord server, but he still hasn't responded/fixed the issue.
BLCU was made in ~5-6 hours, with the help of AI (with plenty of damage control put in place, don't worry). I am NOT a programmer, I'm just some random dude who knows a little bit of programming and wanted to have some extra space in my hard drive for once.
BLCU was also only tested on my own system, which is Linux powered. So, if you're on Windows, YMMV. Sorry.
Also, fun fact: because your username is only pulled once, you can rename yourself and add whatever URL you want to the user.json file, which can make BLCU call you weird things! It's a feature, not a bug :D
Otherwise, if you have any issues that arise, let me know! Or if you want to improve on my shitty coding, then by all means, make a pull request and go for it!