large files in Domoticz-Zigbee folder

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
WouterO
Posts: 91
Joined: Sunday 14 May 2023 19:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

large files in Domoticz-Zigbee folder

Post by WouterO »

Hey pipiche,
I noticed quite large files in the folder: ~/domoticz/plugins/Domoticz-Zigbee/.git/objects/pack/
Are they required for the proper running of the Zigbee plugin or can they harmlessly be removed?
I don't like left-overs clogging my system, unless necessary, of course.
Thanks!
pipiche
Posts: 2050
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: large files in Domoticz-Zigbee folder

Post by pipiche »

Please don't delete them: they are the git history of the plugin. The plugin runs without them, but upgrades would fail. If you have already deleted some, the steps below should also repair the folder.


To reduce the size safely, as the user who owns the plugin folder:

Code: Select all

cd ~/domoticz/plugins/Domoticz-Zigbee
git status      # must say "On branch stable9", with no modified files
git pull        # skip if pack files were already deleted
cd ~            # never clone inside the plugins folder

Code: Select all

git clone -b stable9 --filter=blob:none https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git z4d-new
mv ~/domoticz/plugins/Domoticz-Zigbee/.git ~/z4d-git-old
mv ~/z4d-new/.git ~/domoticz/plugins/Domoticz-Zigbee/.git

Code: Select all

cd ~/domoticz/plugins/Domoticz-Zigbee
git status      # must be clean
git pull
If everything is fine, remove ~/z4d-new and ~/z4d-git-old. Your configuration and data are not touched. Local branches and stashes are not carried over.

As an alternative a more straight forward is:

Code: Select all

  git remote prune origin
  git reflog expire --expire=now --all
  git gc --prune=now --aggressive
This one is non-destructive to the history, so it should be safer

The git gc --prune=now --aggressive command is quiet CPU/IO intensive


I'm going to update the wiki accordingly
Last edited by pipiche on Tuesday 24 November 2026 17:57, edited 1 time in total.
WouterO
Posts: 91
Joined: Sunday 14 May 2023 19:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: large files in Domoticz-Zigbee folder

Post by WouterO »

Thanks for your detailed response!
I didn’t delete anything yet (I thought it better to ask you first 🙂)
I might consider deleting the old branch 7 and 8 data, according to your advice above.
Thanks!
pipiche
Posts: 2050
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: large files in Domoticz-Zigbee folder

Post by pipiche »

Post Reply