Is it safe to "delete/clear" /var/cache/mopidy/spotify?

Hello !

Just a little question,
Can I minimize the space in var/cache/mopidy/spotify ? , right now
it takes 8gb of diskpace of my total 15gb see down below ?

And if it possible to minimize space, can I then keep the cache/mopidy/spotify in small size
lets say keep it in 1gb size.

Cheerz!

  • [Effective config]
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = -1
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file = 

[audio]
mixer = software
mixer_volume = 
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! filesink location=/tmp/snapfifo
buffer_time = 

[proxy]
scheme = 
hostname = 
port = 
username = 
password = 

[tunein]
enabled = true
timeout = 5000
filter = 

[spotify]
enabled = true
username = 9p1mzu5r3fsb1peuvzy78754t
password = ********
client_id = dd5517f4-bb07-4a74-8b42-b8f96e48b419
client_secret = ********
bitrate = 320
volume_normalization = false
timeout = 10
allow_cache = true
cache_size = 8192
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50

[iris]
enabled = true
country = SE
locale = se_SV
verify_certificates = true
snapcast_enabled = true
snapcast_host = xxx.x.x.xxx
snapcast_port = xxxx
snapcast_ssl = false
snapcast_stream = default
spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
lastfm_authorization_url = https://jamesbarnsley.co.nz/iris/auth_lastfm.php
genius_authorization_url = https://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris

[file]
enabled = true
media_dirs = 
  /media/extdisk/Music
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .pdf
  .png
  .txt
  .zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[http]
enabled = true
hostname = xxx.xxxx.xxxx.xxxx
port = 6680
zeroconf = xx.xxx.xxxx.xxx
allowed_origins = 
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir = 
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = 

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols = 
  http
  https
  mms
  rtmp
  rtmps
  rtsp
metadata_blacklist = 
timeout = 5000
  • [Installed dependencies]
Platform: Linux-5.10.0-26-amd64-x86_64-with-glibc2.31
Python: CPython 3.9.2 from /usr/lib/python3.9
Mopidy: 3.4.1 from /usr/lib/python3/dist-packages
Mopidy-Spotify: 4.1.1 from /usr/local/lib/python3.9/dist-packages
  Pykka: 2.0.3 from /usr/lib/python3/dist-packages
  Mopidy: 3.4.1 from /usr/lib/python3/dist-packages
  setuptools: 52.0.0 from /usr/lib/python3/dist-packages
  requests: 2.25.1 from /usr/lib/python3/dist-packages
Mopidy-Iris: 3.68.0 from /usr/local/lib/python3.9/dist-packages
  Mopidy: 3.4.1 from /usr/lib/python3/dist-packages
  Pykka: 2.0.3 from /usr/lib/python3/dist-packages
  setuptools: 52.0.0 from /usr/lib/python3/dist-packages
Mopidy-TuneIn: 1.1.0 from /usr/local/lib/python3.9/dist-packages
  Mopidy: 3.4.1 from /usr/lib/python3/dist-packages
  Pykka: 2.0.3 from /usr/lib/python3/dist-packages
  setuptools: 52.0.0 from /usr/lib/python3/dist-packages
  requests: 2.25.1 from /usr/lib/python3/dist-packages
GStreamer: 1.18.4.0 from /usr/lib/python3/dist-packages/gi
  Detailed information: 
    Python wrapper: python-gi 3.38.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec
        mad

  • Information about your computer’s hardware and software
OS: Debian GNU/Linux 11 (bullseye) x86_64 
Host: KVM/QEMU (Standard PC (i440FX + PIIX, 1996) pc-i440fx-5.2) 
Kernel: 5.10.0-26-amd64 
Uptime: 1 day, 5 hours, 35 mins 
 Packages: 668 (dpkg) 
 Shell: bash 5.1.4 
 Resolution: 1024x768 
 Terminal: /dev/pts/0 
 CPU: Intel (Skylake, IBRS) (2) @ 3.000GHz 
 GPU: 00:02.0 Red Hat, Inc. QXL paravirtual graphic card 
 Memory: 149MiB / 1970MiB 
var/cache/mopidy/spotify$ sudo du -hs * | sort -hr
108M	b4
89M	b3
83M	e1
78M	b2
78M	4d
76M	15
73M	3e
72M	c0
71M	d2
71M	81
71M	39
71M	1b
69M	9e
69M	5c
69M	21
69M	0e
68M	26
67M	67
67M	46
67M	28
65M	eb
64M	c4
62M	77
61M	d6
60M	ed
60M	66
60M	4b
59M	f8
59M	d0
59M	1f
58M	ea
57M	ff
57M	f6
57M	bf
57M	be
57M	59
56M	99
56M	90
56M	2c
56M	0c
55M	3d
54M	fd
54M	c7
54M	a9
54M	9b
53M	80
53M	1e
52M	95
52M	64
52M	5f
52M	40
51M	ef
51M	dd
51M	72
51M	31
51M	06
50M	a4
49M	6d
48M	c2
48M	2a
47M	f5
47M	cc
47M	45
47M	1a
47M	04
46M	c5
46M	b6
46M	84
46M	74
46M	4c
46M	02
45M	df
45M	ad
45M	8b
45M	86
45M	69
45M	56
45M	22
44M	bd
44M	b9
44M	43
44M	20
43M	6e
43M	60
43M	25
42M	e5
42M	d7
42M	70
42M	01
41M	7f
41M	6f
41M	2e
41M	23
40M	85
40M	65
40M	57
40M	19
40M	07
39M	cb
39M	27
38M	fb
38M	f3
38M	b7
38M	b1
38M	ae
37M	e4
37M	d4
37M	b8
37M	92
36M	8a
36M	82
36M	7c
36M	75
36M	53
36M	50
36M	0a
36M	03
35M	de
35M	d3
34M	91
34M	4f
33M	d9
33M	c8
33M	9c
32M	e2
32M	c3
32M	8f
31M	6c
31M	61
31M	24
30M	58
29M	54
29M	37
29M	08
28M	a7
28M	98
28M	88
28M	7a
28M	71
28M	48
28M	1d
27M	e6
27M	da
26M	ca
26M	a1
25M	fa
25M	42
24M	f2
24M	ba
24M	a2
24M	5a
24M	36
24M	05
23M	ac
23M	4e
22M	f9
22M	a0
22M	9f
22M	83
22M	5b
22M	3c
22M	18
22M	0f
22M	00
21M	dc
21M	d8
21M	cf
21M	c1
21M	8d
21M	79
21M	34
21M	2f
21M	29
20M	ce
20M	a3
20M	33
19M	e8
19M	c6
19M	a6
19M	78
19M	6a
18M	f1
18M	b5
18M	32
17M	fe
17M	ee
16M	ab
16M	49
15M	e7
15M	e0
15M	af
15M	9d
15M	44
15M	3f
15M	3b
14M	30
14M	11
13M	f4
13M	aa
13M	a8
13M	51
13M	1c
12M	6b
11M	9a
11M	97
11M	87
11M	62
11M	4a
11M	16
9.7M	3a
9.6M	10
9.5M	c9
9.5M	89
9.3M	e3
9.0M	73
8.9M	8c
8.7M	db
8.7M	7b
8.6M	0d
8.5M	f0
8.4M	7d
8.4M	55
8.3M	41
7.9M	0b
7.8M	b0
7.4M	bc
7.2M	35
6.9M	a5
6.8M	d1
5.7M	7e
5.3M	17
5.1M	5e
5.1M	09
4.9M	94
4.8M	f7
4.4M	bb
4.3M	14

First of all, are Mopidy-Spotify 4.1.1 of any use to you? Are you able to play anything with it? It depends on libspotify which was intentionally broken by Spotify in May 2022.

Assuming this is still useful to you…

Yes, it is safe to remove /var/cache/mopidy/spotify.

If you delete it, the cache will grow back over time to take whatever size is set in the spotify/cache_size config in Mopidy, which defaults to 8192 MiB, which matches very well with the current cache size you are seeing.

To reduce the maximum cache size to 1GiB, you can add this to your mopidy.conf:

[spotify]
cache_size = 1024

This is documented at GitHub - mopidy/mopidy-spotify: Mopidy extension for playing music from Spotify

Hello!

Thanks for reply,

Yes Spotify works very well, I have installled it with the instructions from the official github repo with the Rust installation way.

I have completely missed that cache setting in my config, I shall adjust that immediatly.

Thanks again for reply!

cheers!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.