Difference between revisions of "HOW-TO:Reduce disk space usage"

From Official Kodi Wiki
Jump to: navigation, search
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:Crystal 128 kcmpartitions.png|128px|right]]<section begin="intro" />As your library and usage of XBMC grows, so does the disk space storage taken up by XBMC's various settings and files. If you have a device with a low amount of internal disk space storage (8GB or less), such as an [[ATV2]], [[Raspberry Pi]], and various [[Android]] boxes, this can be a problem. And the same goes when running XBMC from a smaller sized USB flash drive or SD (Secure Digital) card. This how-to will show ways to reduce the space used, as well as reclaim space from files that are no longer needed. <section end="intro" />
+
[[File:Crystal 128 kcmpartitions.png|128px|right]]<section begin="intro" />As your library and usage of Kodi grows, so does the disk space storage taken up by Kodi's various settings and files. If you have a device with a low amount of internal disk space storage (8GB or less), such as a [[Fire TV]], [[Raspberry Pi]], and various [[Android]] boxes, this can be a problem. And the same goes when running Kodi from a smaller sized USB flash drive or SD (Secure Digital) card. This how-to will show ways to reduce the space used, as well as reclaim space from files that are no longer needed. <section end="intro" />
  
XBMC stores data mainly in the [[userdata folder]] or the parent folder of userdata, "XBMC".
+
 
 +
Kodi stores data mainly in the '''[[userdata folder]]''' or the parent folder of userdata, "xbmc" or "kodi".
  
 
== Cleanup unused cached images ==
 
== Cleanup unused cached images ==
 
{{main|Texture Cache Maintenance utility}}
 
{{main|Texture Cache Maintenance utility}}
XBMC does not automatically prune old images that are no longer used. For example, if you remove a movie from the library then the poster and fanart will still be saved in XBMC's userdata folder. Until XBMC has an internal method of pruning these files you can use the highly versatile '''[[Texture Cache Maintenance utility]]''' to remove unused images.
+
Kodi does not automatically prune old images that are no longer used. For example, if you remove a movie from the library then the poster and fanart will still be saved in the userdata folder. Until Kodi has an internal method of pruning these files you can use the highly versatile '''[[Texture Cache Maintenance utility]]''' to remove unused images.
  
 
== Actor images ==
 
== Actor images ==
If you don't care to download pictures of Actors for when you are browsing or looking up actor information in XBMC, you can turn this off. Doing so can often save a few hundred megabytes of disk space storage, depending on how versatile your video library is.
+
If you don't care to download pictures of Actors for when you are browsing or looking up actor information, you can turn this off. Doing so can often save a few hundred megabytes of disk space storage, depending on how versatile your video library is.
 +
 
 +
Go into {{highlight|bordered=yes|'''[[Settings/Media/Videos#Download_actor_thumbnails|Settings -> Media -> Videos -> Library]]'''}} and disable the {{highlight|bordered=yes|'''Download actor thumbnails'''}} option.
  
Go into {{highlight|bordered=yes|'''[[Settings/Videos#Library|XBMC -> Settings -> Video -> Library ->]]'''}} and disable the {{highlight|bordered=yes|'''Download actor thumbnails when adding to library'''}} option.
+
== Fanart images ==
 +
It is possible to disable the automatic downloading of "background" images for TV shows and movies, known as "fanart". See '''[[Set content and scan]]''' for details and the location of this setting.
  
 
== Limit the size of cached images ==
 
== Limit the size of cached images ==
 
{{main|advancedsettings.xml#Artwork}}
 
{{main|advancedsettings.xml#Artwork}}
Whenever XBMC downloads images from the internet, or even loads local images saved along side your media, it caches these images inside of [[userdata]]/Thumbnails/. By default, large images are scaled down to the default values shown below, but they can be sized even smaller to save additional space. Often, depending on the skin and TV you use, you can resize images without any noticeable decrease in quality. Smaller images can also speed up the GUI on low-power devices.
+
Whenever Kodi downloads images from the internet, or even loads local images saved along side your media, it caches these images inside of [[userdata]]/Thumbnails/. By default, large images are scaled down to the default values shown below, but they can be sized even smaller to save additional space. Often, depending on the skin and TV you use, you can resize images without any noticeable decrease in quality. Smaller images can also speed up the GUI on low-power devices.
  
  
Line 47: Line 51:
 
== Move cached images to another drive ==
 
== Move cached images to another drive ==
 
{{main|Path substitution}}
 
{{main|Path substitution}}
Path substitution is another [[advancedsettings.xml]] tag. If you simply need more space for XBMC's files but don't wish to limit the image quality then you can use path subs to relocate the images to another drive. The cached images in the Thumbnails folder takes up the most amount of space of all the different XBMC files, so using pathsubs on that folder alone is often all you need to do. It's even possible to use a network [[file share]] path, but it is recommended that you use another local drive, if possible, for performance reasons.
+
Path substitution is another [[advancedsettings.xml]] tag. If you simply need more space for Kodi's files but don't wish to limit the image quality then you can use path subs to relocate the images to another drive. The cached images in the Thumbnails folder takes up the most amount of space of all the different Kodi files, so using pathsubs on that folder alone is often all you need to do. It's even possible to use a network [[file share]] path, but it is recommended that you use another local drive, if possible, for performance reasons.
  
 
If you have not made an [[advancedsettings.xml]] file before, see the example in the above section '''[[#Limit the size of cached images]]'''.
 
If you have not made an [[advancedsettings.xml]] file before, see the example in the above section '''[[#Limit the size of cached images]]'''.
Line 57: Line 61:
 
   <substitute>
 
   <substitute>
 
     <from>special://profile/Thumbnails/</from>
 
     <from>special://profile/Thumbnails/</from>
     <to>G:\Other Drive\</to>
+
     <to>smb://10.0.0.3/Thumbnails/</to>
 
   </substitute>
 
   </substitute>
 
  </pathsubstitution>
 
  </pathsubstitution>
Line 64: Line 68:
  
 
== Limit add-on rollback ==
 
== Limit add-on rollback ==
{{main|Add-on manager#Rollback}}
+
Another [[advancedsettings.xml]] tag that can be used is <code><packagefoldersize></code>. Kodi saves old copies of add-ons in case you ever need to revert to a previous version, in case there was a bug in the new version or the user did not like one of the changes. Old add-on packages don't normally take up a lot of space, and the default max size before Kodi starts deleting old packages is 200 megabytes. This setting is mainly to allow a user to increase the number of old versions saved, but it can be used to lower them.
 
 
Another [[advancedsettings.xml]] tag that can be used is <code><packagefoldersize></code>. XBMC saves old copies of add-ons in case you ever need to revert to a previous version, in case there was a bug in the new version or the user did not like one of the changes. Old add-on packages don't normally take up a lot of space, and the default max size before XBMC starts deleting old packages is 200 megabytes. This setting is mainly to allow a user to increase the number of old versions saved, but it can be used to lower them.
 
  
  
Since this only saves 200MBs of data, it is generally not needed to change this setting.
+
Since this only saves 200MBs of data, it is generally not needed, nor recommended, to change this setting.
  
  
Line 80: Line 82:
 
</advancedsettings>
 
</advancedsettings>
 
</syntaxhighlight >
 
</syntaxhighlight >
 +
 +
== Android: moving all settings to another drive/location ==
 +
{{main|HOW-TO:Change settings folder for Android}}
 +
Kodi for Android devices can move all of the settings and userdata files from their default location to another drive or even a network share. This is great for devices that have a limited amount of internal memory, but have an SD card slot or USB drive available.
  
 
== See also ==
 
== See also ==
[[iOS FAQ#Not enough space/memory]] - Advice for ATV2 users for when your device runs out of internal drive space.
+
* [[Caches explained]]
  
{{gotham updated}}
+
{{Updated|17}}
  
 
[[Category:Advanced topics]]
 
[[Category:Advanced topics]]
 
[[Category:How-to]]
 
[[Category:How-to]]

Latest revision as of 08:04, 19 October 2018

Crystal 128 kcmpartitions.png
As your library and usage of Kodi grows, so does the disk space storage taken up by Kodi's various settings and files. If you have a device with a low amount of internal disk space storage (8GB or less), such as a Fire TV, Raspberry Pi, and various Android boxes, this can be a problem. And the same goes when running Kodi from a smaller sized USB flash drive or SD (Secure Digital) card. This how-to will show ways to reduce the space used, as well as reclaim space from files that are no longer needed.


Kodi stores data mainly in the userdata folder or the parent folder of userdata, "xbmc" or "kodi".

1 Cleanup unused cached images

Kodi does not automatically prune old images that are no longer used. For example, if you remove a movie from the library then the poster and fanart will still be saved in the userdata folder. Until Kodi has an internal method of pruning these files you can use the highly versatile Texture Cache Maintenance utility to remove unused images.

2 Actor images

If you don't care to download pictures of Actors for when you are browsing or looking up actor information, you can turn this off. Doing so can often save a few hundred megabytes of disk space storage, depending on how versatile your video library is.

Go into Settings -> Media -> Videos -> Library and disable the Download actor thumbnails option.

3 Fanart images

It is possible to disable the automatic downloading of "background" images for TV shows and movies, known as "fanart". See Set content and scan for details and the location of this setting.

4 Limit the size of cached images

Whenever Kodi downloads images from the internet, or even loads local images saved along side your media, it caches these images inside of userdata/Thumbnails/. By default, large images are scaled down to the default values shown below, but they can be sized even smaller to save additional space. Often, depending on the skin and TV you use, you can resize images without any noticeable decrease in quality. Smaller images can also speed up the GUI on low-power devices.


Note: advancedsettings.xml is for advanced settings and features that normal users don't normally need to modify, but will be used in this how-to.

  1. Create a plain text file (no rich text formatting, don't use .doc, etc) and save it as advancedsettings.xml. Make sure that the file extension is ".xml" and not ".txt" or ".xml.txt".
  2. Cut and paste this into your new plain text file:
    <advancedsettings>
      <imageres>720</imageres>
      <fanartres>1080</fanartres>
    </advancedsettings>
    
  3. Change the two sizes to a lower value, depending on your needs and how much resolution you need for your skin/TV. See "Tag details" below for more info.
  4. Save this file in your userdata folder:

Note: If you have an existing advancedsettings.xml file, make sure the tags are between the main <advancedsettings></advancedsettings> tags.

Tag details:

advancedsettings.xml tag what it does
<imageres>720</imageres> Specify the maximum resolution that cached artwork (other than fanart / 16:9 images) should be resized to in pixels. The width is automatically calculated as being 16/9*height. The image will be resized to fit within this size. e.g. an image that is 2000x500 will be cached at size 1280x320. An image that is 500x800 will be cached at size 450x720 using the default value of 720.
<fanartres>1080</fanartres> Specify the maximum resolution that cached fanart should be resized to in pixels. The width is automatically calculated as being 16/9*height. Only images that are exactly 16x9 and equal to or greater than this resolution will be cached at this size - all other images will be cached using <imageres>. The default value is 1080.

5 Move cached images to another drive

Path substitution is another advancedsettings.xml tag. If you simply need more space for Kodi's files but don't wish to limit the image quality then you can use path subs to relocate the images to another drive. The cached images in the Thumbnails folder takes up the most amount of space of all the different Kodi files, so using pathsubs on that folder alone is often all you need to do. It's even possible to use a network file share path, but it is recommended that you use another local drive, if possible, for performance reasons.

If you have not made an advancedsettings.xml file before, see the example in the above section #Limit the size of cached images. Note: If you have an existing advancedsettings.xml file, make sure the <pathsubstitution></pathsubstitution> tags are between the main <advancedsettings></advancedsettings> tags.

<advancedsettings>
 <pathsubstitution>
  <substitute>
    <from>special://profile/Thumbnails/</from>
    <to>smb://10.0.0.3/Thumbnails/</to>
  </substitute>
 </pathsubstitution>
</advancedsettings>

6 Limit add-on rollback

Another advancedsettings.xml tag that can be used is <packagefoldersize>. Kodi saves old copies of add-ons in case you ever need to revert to a previous version, in case there was a bug in the new version or the user did not like one of the changes. Old add-on packages don't normally take up a lot of space, and the default max size before Kodi starts deleting old packages is 200 megabytes. This setting is mainly to allow a user to increase the number of old versions saved, but it can be used to lower them.


Since this only saves 200MBs of data, it is generally not needed, nor recommended, to change this setting.


If you have not made an advancedsettings.xml file before, see the example in the above section #Limit the size of cached images. Note: If you have an existing advancedsettings.xml file, make sure the <packagefoldersize></packagefoldersize> tags are between the main <advancedsettings></advancedsettings> tags.

<advancedsettings>
  <packagefoldersize>200</packagefoldersize> <!-- The amount in megabytes of packages saved from previous add-on installs. -->
</advancedsettings>

7 Android: moving all settings to another drive/location

Kodi for Android devices can move all of the settings and userdata files from their default location to another drive or even a network share. This is great for devices that have a limited amount of internal memory, but have an SD card slot or USB drive available.

8 See also