How to reset jupyter notebook theme to default?

Question:

I’m using the jupyter notebook installed with Anaconda (I’m on Mac). Few days ago, I wanted to change the theme to have a dark background, and I followed the instructions here. Namely, I’ve downloaded the theme custom.css and placed it in ~/.jupyter/custom/. It worked very well.

I liked the theme, but I would like to go back to the default one (this one does not show the main toolbar, among other things). I tried to remove the custom.css from its folder, I reset my terminal, but nothing changes! I’m guessing that jupyter keeps a copy of the themes somewhere that I should delete, but I can’t find it.

I have also tried uninstalling jupyter and reinstalling, following the commands:

conda update conda
conda uninstall ipython
conda install jupyter

Again, no change. I’m stuck with my black background theme with no toolbar.

Asked By: marguerite

||

Answers:

My previous suggestion of deleting the custom/ directory doesn’t do the trick. jupyter caches the custom.css file in other directories that are tricky to clear all together. If it doesn’t find a folder custom with .css file inside it it looks in other locations to pick up a .css file.
Also, I’m not sure if every location is actually deleted when you uninstall jupyter.

The easiest solution is to delete the old custom.css and replace it with a new empty custom.css file. jupyter picks that up and goes back to its default look.

An easier way might be to do:

pip install jupyterthemes

Now you can choose from the following given themes and activate it like this

# list available themes
# onedork | grade3 | oceans16 | chesterish | monokai | solarizedl | solarizedd
jt -t <THEME_NAME>

In order to reset your theme to the default theme just use

jt -r

For all information and more, visit github.com/dunovank/jupyter-themes

Answered By: M. Glombek

in command prompt type jupyter then press enter and then type jt -r it will surely work

Answered By: Kushal Agarwal

in Anaconda prompt simply run
jupyter
then,
jt -r

Answered By: Soumyajit_Dawn

In order to reset your theme type in cmd

jt -r

delete the directories returned by console. Now restart the notebook server.

Answered By: Eswar Chitirala

Close any instances of jupyter notebook.
Open Anaconda prompt.
Run “pip install jupyterthemes”
This should show you the themes installed/ cached by jupyter notebook.

Running pip install jupyterthemes

Now run “jt -r” to reset the theme to default as shown below.

enter image description here

Open and test jupyter notebook. Theme should be gone now. Cheers!!!

Answered By: Shubhdeep Singh

On windows running jt from the notebook, one has to precede the jt command with the !.

!jt -t oceans16 (my choice)

!jt -r 
Answered By: LetzerWille

I’m a newbie and had problems with all of the above solutions and all I wanted was to set it back to default. I was stuck in a dark mode theme. Instead, I found that going to C:Users”Username_Here”anaconda3Libsite-packages and finding the “jupyter themes” folders and deleting them entirely. Set everything back to default. There were 2 folders to delete.

Answered By: mochablitz99

I am hoping that you used pip install jupyterthemes to get the custom themes.

The following are the steps that take you from installation of new themes to the resetting of the same to default.

pip install jupyterthemes 

jt -l (List of all themes)

jt -t <THEME NAME> (to implement a theme)

jt -r (to reset the notebook to default)

Hope this helps.

Answered By: Pragyaditya Das

If you are having trouble viewing the tool bar you can put this code in:

!jt -t solarizedd -T -N -kl

Where:
Toolbar Visible -T
Name & Logo Visible -N
Kernel Logo Visible -kl
their defaults are set to none

Answered By: Shawn Jamal

Just go to the c drive and users directory. there you can see jupyter directory . delete it completely and freshly again start jupyter notebook by clicking ananconda shell. that is all needed.
simple issue .

Answered By: joshy

I was actually trying to change the font size of the dark theme and wrote the command –
jt -fs 200
and it actually changed the theme back to the default one.

Answered By: Yogita Patel

You don’t need to reinstall jupyter-notebook, the problem is with jupyterthemes.

You can reset current theme to default with: jt -r,
or just set the same theme with prefered flags which enable:

  • toolbar: -T
  • filename and logo: -N
  • kernel logo: -kl

e.g. !jt -t monokai -T -N -kl


If you don’t like the new shape jupyterthemes imposes on jupyter-notebook, I can recommend jupyter-themer which is easier to use and is not effecting the default shape of jupyter-notebook at all.

Installation: pip install jupyter-themer

Repositorium with documentation and examples (*for now, examples are stored in a not merged pull-request): @github: jupyter-thamer

My favourite customization: jupyter-themer -b dark -c zenburn.

Answered By: maciejwww

try to run this

! jt -r

then refresh to Jupiter notebook

Answered By: Itay Guy