Storage page disk metrics to recover disk space

There are a number of forum threads about running out of disk space, with a wide variety of causes and solutions. In investigating this issue it seems there are several common disk hogs, some are within Home Assistant, but some are at underlying OS level.

HA running out of disk space is not handled in a user-friendly way, and there seems no easy way to determine what is using disk space. A user-friendly front-end to display and tidy up the main disk hogs would be appreciated.

I appreciate that HA consists of so many modules plus add-ons and HACS modules that it would be impossible to enforce a consistent handling of no disk space condition … but an official recommended function / procedure would be helpful. Preferably something that doesn’t frighten non-database administrators by stating that “an unknown transaction needs to be rolled back before …”

  • Backups are automatically created by default at every update, but it is left to the user to delete them manually.
  • Sometimes the backup fails and the created file will not be added to the HA list of backups, but it will not be removed from the disk.
  • home-assistant_v2.db can grow quite large (but in my case only 460MB) - but this seems to default to trimming automagically.
  • apparently docker saves old images, which can be trimmed by ‘docker image prune’
  • there are system log files and other files which grow over time
  • excessive numbers of error messages (eg Wyoming generating an error every 10 seconds (approx 11,000 per day)
  • overlay2 folder keeps growing

In the System > Storage page it shows percentage storage space used.

  • could we add the size that it is a percentage of (ie size of the disk/partition) ?
  • could we display space taken by HA core and each add-on (ideally code and data sizes) ?
  • could we lookup and display the size of the most common disk hogs (ie. backups, Docker images, media) ? And provide a link to an analysis of all HA add-ons
  • could we compare the list of backups in the Backups page and compare with the files in backups folder, to delete failed backups ?
  • could this screen launch scripts (eg to trim old files), and/or link to instructions for Recorder ?

I’m envisaging the Storage page looking like

This should be already exposed, but it’s not shown in the front end for some reason.

I found this out last week - if you click inspect element on the storage percentage bar, you’ll find the actual values in the console

I was really surprised when I noticed that my system was running low on storage that there is no detail behind the initial screen. It does not even show total storage :man_facepalming:


What is more the “move data disk” does not even tell me how much data would be moved (I assume that not all of the 71.3% of used storage would actually move…)

If you present another disk to HA, you can use that tool to move the data to another disk. ( example adding a 500GB disk to your existing 128GB )