Below are the step‐by‐step instructions to completely remove the Brave Browser Nightly version and all of its residual files from your Ubuntu system. Make sure you back up any personal data you might need before proceeding.
Warning:
The commands below will remove Brave Browser Nightly and its configuration data. If you have any bookmarks or settings you want to save, export or back them up before continuing.
1. Remove the Brave Browser Nightly Package
Open a terminal and run the following command to purge the package (which removes both the package and its configuration files):
sudo apt purge brave-browser-nightly
2. Remove Unused Dependencies
After purging the package, clean up any unused dependencies:
sudo apt autoremove --purge
This command will remove any orphaned packages (dependencies that were installed for Brave but are no longer needed).
3. Remove the Brave Repository (if added)
If you added the Brave Nightly repository to your system sources, remove its repository file. Typically, the file is located in /etc/apt/sources.list.d/. To check and remove it:
-
List repository files:
ls /etc/apt/sources.list.d/
Look for a file named similar to brave-browser-nightly.list or any file that refers to Brave.
-
Remove the repository file:
For example, if the file is named brave-browser-nightly.list, remove it with:
sudo rm /etc/apt/sources.list.d/brave-browser-nightly.list
-
Update your package lists:
sudo apt update
4. Remove Brave’s GPG Key (Optional)
If you imported a GPG key for Brave, you might want to remove it too. To list the keys:
sudo apt-key list
Find the key associated with Brave and note its last 8 characters (the key ID). Remove it with:
sudo apt-key del <KEY_ID>
Replace <KEY_ID> with the actual key ID (e.g., 4F4A 3B9E might become 3B9E).
Note: Newer versions of Ubuntu recommend managing keys via the /etc/apt/trusted.gpg.d/ directory. If your Brave key is there, you can remove it by deleting its file.
5. Remove User-specific Configuration and Cache Files
Brave stores user configuration and cache in your home folder. To remove these, execute:
rm -rf ~/.config/BraveSoftware/Brave-Browser-Nightly
rm -rf ~/.cache/BraveSoftware/Brave-Browser-Nightly
If you have installations or profiles in other locations (for example, if you customized the paths), remove them accordingly.
Final Notes
After completing these steps, Brave Browser Nightly and its residual files should be completely removed from your system.
If you run into any issues or if any files or directories remain, you can search for them with:
find ~ -iname "*brave*"
This command will list any files or directories containing “brave” in their names so you can review and manually remove them if necessary.
This complete removal process ensures that both system-wide and user-specific files for Brave Browser Nightly are deleted from your Ubuntu 24.04 system.