We would like to update Arkenfox user.js in Firefox. https://github.com/arkenfox/user.js/releases
There are 2 .sh files in the zip: prefsCleaner.sh and updater.sh.
See https://github.com/arkenfox/user.js/releases/tag/135.0 Assets/ Source code/(zip)
We understand we have to clean the existing user.js before updating. Sadly we don't understand how to do this.
https://github.com/arkenfox/user.js/blo ... updater.sh
How update Arkenfox user.js in Firefox
- Pretty Vacant
- Posts: 177
- Joined: Tue Jul 02, 2024 7:41 am
How update Arkenfox user.js in Firefox
MX-23.5_x64 Libretto- xfce
Re: How update Arkenfox user.js in Firefox
I never used arkenfox and I though I would first test upgrading it before posting my response.
Instead of just providing a short one or two-sentence answer I though a more detailed answer would be more helpful for you and/or interested readers, so here goes.
To test, I downloaded an older arkenfox zip file (user.js version 134) from https://github.com/arkenfox/user.js/releases to install and then test upgrading to version 135 to confirm it works.
FYI, there is no need to manually download a newer version because that is done automatically with the updater as shown below, presuming of course that you have an Internet connection.
Also, when installing arkenfox, only three of the files from arkenfox is needed to be put in the Firefox root profile directory. Well, actually udpater.sh is not required but it makes the updating process so much easier. The three files are:
In the below command to run update, note that /*/ represents the Firefox profile which consists of eight characters followed by default-release or similar wording. For example tp92ei77.default-release is the profile name assigned to the Firefox profile I used in my testing. That is why I used a wild-card to represent the Firefox profile. You can put your full profile directory name in place of the asterisk wild-card if you prefer or just change the Terminal working directory to the Firefox profile directory and use the commands as shown for that in the next paragraph.
Alternatively the command could be run from a Terminal where the working directory is where the arkenfox files are kept (in the Firefox root or "top" profile directory). In that case, either of these Terminal commands could then be:
The warning at the end of the update output line "Warning: Could not fine override file: user-overrides.js" is only because I did not create that file. There is nothing wrong with the update.
The command to update to the latest arkenfox version is ~/.mozilla/firefox/*/./updater.sh. Note that the terminal can be run from the user home directory (the default location when the Terminal opens). That command with output below it is:
The prefsCleaner.sh command is to run after the update (yes, AFTER) per arkenfox https://github.com/arkenfox/user.js/wik ... efsCleaner. Right after the red square at the top of the page it says "Summary: ALWAYS [their emphasis] run perfsCleaner[.sh] after updating". Arkenfox said that "this will reset prefs that aren't needed or can cause issues, as well as keep things clean and tidy". Also, ensure Firefox is closed when this is done.
The command is ~/.mozilla/firefox/*/./prefsCleaner.sh with the output as shown below. Confirmation is at the end of the output:
Hope this answers your question.
Instead of just providing a short one or two-sentence answer I though a more detailed answer would be more helpful for you and/or interested readers, so here goes.
To test, I downloaded an older arkenfox zip file (user.js version 134) from https://github.com/arkenfox/user.js/releases to install and then test upgrading to version 135 to confirm it works.
FYI, there is no need to manually download a newer version because that is done automatically with the updater as shown below, presuming of course that you have an Internet connection.
Also, when installing arkenfox, only three of the files from arkenfox is needed to be put in the Firefox root profile directory. Well, actually udpater.sh is not required but it makes the updating process so much easier. The three files are:
- user.js
- updater.sh
- prefCleaner.sh
In the below command to run update, note that /*/ represents the Firefox profile which consists of eight characters followed by default-release or similar wording. For example tp92ei77.default-release is the profile name assigned to the Firefox profile I used in my testing. That is why I used a wild-card to represent the Firefox profile. You can put your full profile directory name in place of the asterisk wild-card if you prefer or just change the Terminal working directory to the Firefox profile directory and use the commands as shown for that in the next paragraph.
Alternatively the command could be run from a Terminal where the working directory is where the arkenfox files are kept (in the Firefox root or "top" profile directory). In that case, either of these Terminal commands could then be:
- ./updater.sh -OR- bash updater.sh
- ./prefsCleaner.sh -OR- bash prefsCleaner.sh
The warning at the end of the update output line "Warning: Could not fine override file: user-overrides.js" is only because I did not create that file. There is nothing wrong with the update.
The command to update to the latest arkenfox version is ~/.mozilla/firefox/*/./updater.sh. Note that the terminal can be run from the user home directory (the default location when the Terminal opens). That command with output below it is:
Code: Select all
~/.mozilla/firefox/*/./updater.sh
############################################################################
#### ####
#### arkenfox user.js ####
#### Hardening the Privacy and Security Settings of Firefox ####
#### Maintained by @Thorin-Oakenpants and @earthlng ####
#### Updater for macOS and Linux by @overdodactyl ####
#### ####
############################################################################
Documentation for this script is available here: https://github.com/arkenfox/user.js/wiki/5.1-Updater-[Options]#-maclinux
Please observe the following information:
Firefox profile: /home/Demo/.mozilla/firefox/tp92ei77.default-release
Available online: * version: 135
Currently using: * version: 133
This script will update to the latest user.js file and append any custom configurations from user-overrides.js. Continue Y/N?
Y
Status: user.js has been backed up and replaced with the latest version!
Warning: Could not find override file: user-overrides.js
The prefsCleaner.sh command is to run after the update (yes, AFTER) per arkenfox https://github.com/arkenfox/user.js/wik ... efsCleaner. Right after the red square at the top of the page it says "Summary: ALWAYS [their emphasis] run perfsCleaner[.sh] after updating". Arkenfox said that "this will reset prefs that aren't needed or can cause issues, as well as keep things clean and tidy". Also, ensure Firefox is closed when this is done.
The command is ~/.mozilla/firefox/*/./prefsCleaner.sh with the output as shown below. Confirmation is at the end of the output:
Code: Select all
~/.mozilla/firefox/*/./prefsCleaner.sh
╔══════════════════════════╗
║ prefs.js cleaner ║
║ by claustromaniac ║
║ v2.1 ║
╚══════════════════════════╝
This script should be run from your Firefox profile directory.
It will remove any entries from prefs.js that also exist in user.js.
This will allow inactive preferences to be reset to their default values.
This Firefox profile shouldn't be in use during the process.
In order to proceed, select a command below by entering its corresponding number.
1) Start
2) Help
3) Exit
#? 1
prefs.js backed up: prefsjs_backups/prefs.js.backup.2025-04-25_0411
Cleaning prefs.js...
All done!
Hope this answers your question.
- Pretty Vacant
- Posts: 177
- Joined: Tue Jul 02, 2024 7:41 am
Re: How update Arkenfox user.js in Firefox
Hi Stuart_M, thanks for the explanation!
Not sure that happened in our situation, maybe we didn't install arkenfox user.js zip in the proper way...Stuart_M wrote: Fri Apr 25, 2025 5:59 am FYI, there is no need to manually download a newer version because that is done automatically with the updater as shown below, presuming of course that you have an Internet connection.
are you sure folder 'scratchpad-scripts' containing arkenfox-cleanup.js + troubleshooter.js are not necessary?The three files are...
MX-23.5_x64 Libretto- xfce
Re: How update Arkenfox user.js in Firefox
Yes and no.
According to arkenfox (https://github.com/arkenfox/user.js/wik ... &-Maintain under the "APPLY" section), if a new profile is being used then the arkenfox-cleanup.js cleanup script is not needed. That script appears in their github section here https://github.com/arkenfox/user.js/blo ... cleanup.js. Also, it is "recommended" to use so no, it is not "necessary" but again, it depends how you define "necessary". Some people may find it necessary, others not.
The instructions for using that file are in the beginning of the file. The script of the file is to be manually inserted (pasted) into the Firefox "about:config" page with a Web Console opened there. But again, that is only recommended if a new Firefox profile is not being used. Its use is to be manually copied into a Web Console opened on the firefox "about:config" page.
As far as the troubleshooter.js file (https://github.com/arkenfox/user.js/wik ... leshooting), it is only for manual use to troubleshoot. Again, some people may find it necessary for that file to be always located in ~/.mozilla/firefox/*.default-release but is not necessary for Arkenfox to run. It is necessary to be in that location only when it is (manually) run to troubleshoot. Some may not want to have anything to do with troubleshooting or may want keep that file elsewhere and move it to the Firefox profile location only when it needs to be run, etc. Necessary? It depends.
The point I was attempting to make in stating only three files were needed to be put in the Firefox profile was to show what is needed to use Arkenfox in Firefox. It depends on how you define "necessary" and, based on your last post, I have a gut feeling that what I find necessary is different from what you find necessary, but that's just a hunch.
According to arkenfox (https://github.com/arkenfox/user.js/wik ... &-Maintain under the "APPLY" section), if a new profile is being used then the arkenfox-cleanup.js cleanup script is not needed. That script appears in their github section here https://github.com/arkenfox/user.js/blo ... cleanup.js. Also, it is "recommended" to use so no, it is not "necessary" but again, it depends how you define "necessary". Some people may find it necessary, others not.
The instructions for using that file are in the beginning of the file. The script of the file is to be manually inserted (pasted) into the Firefox "about:config" page with a Web Console opened there. But again, that is only recommended if a new Firefox profile is not being used. Its use is to be manually copied into a Web Console opened on the firefox "about:config" page.
As far as the troubleshooter.js file (https://github.com/arkenfox/user.js/wik ... leshooting), it is only for manual use to troubleshoot. Again, some people may find it necessary for that file to be always located in ~/.mozilla/firefox/*.default-release but is not necessary for Arkenfox to run. It is necessary to be in that location only when it is (manually) run to troubleshoot. Some may not want to have anything to do with troubleshooting or may want keep that file elsewhere and move it to the Firefox profile location only when it needs to be run, etc. Necessary? It depends.
The point I was attempting to make in stating only three files were needed to be put in the Firefox profile was to show what is needed to use Arkenfox in Firefox. It depends on how you define "necessary" and, based on your last post, I have a gut feeling that what I find necessary is different from what you find necessary, but that's just a hunch.