sharix
Posts: 200
Joined: Thu Feb 16, 2012 11:29 am
Location: Slovenia

/root/.rpi-firmware/.git/

Thu Oct 25, 2012 9:14 am

I noticed this folder is using a lot of my SD card space.

Code: Select all

sudo du -hs /root/.rpi-firmware/.git/* | sort -h
4.0K	/root/.rpi-firmware/.git/branches
4.0K	/root/.rpi-firmware/.git/config
4.0K	/root/.rpi-firmware/.git/description
4.0K	/root/.rpi-firmware/.git/FETCH_HEAD
4.0K	/root/.rpi-firmware/.git/HEAD
4.0K	/root/.rpi-firmware/.git/ORIG_HEAD
4.0K	/root/.rpi-firmware/.git/packed-refs
4.0K	/root/.rpi-firmware/.git/shallow
8.0K	/root/.rpi-firmware/.git/info
32K	/root/.rpi-firmware/.git/refs
40K	/root/.rpi-firmware/.git/logs
48K	/root/.rpi-firmware/.git/hooks
156K	/root/.rpi-firmware/.git/index
714M	/root/.rpi-firmware/.git/objects
As you can see, there's a folder called "objects" which takes up more than 700 MB of space.
Inside it there are several folders a couple of MBs big and one larger, with over 400 MB.

Code: Select all

[...]
4.9M	/root/.rpi-firmware/.git/objects/0f
5.2M	/root/.rpi-firmware/.git/objects/b5
9.5M	/root/.rpi-firmware/.git/objects/3e
9.5M	/root/.rpi-firmware/.git/objects/54
9.5M	/root/.rpi-firmware/.git/objects/77
9.5M	/root/.rpi-firmware/.git/objects/84
9.5M	/root/.rpi-firmware/.git/objects/89
9.5M	/root/.rpi-firmware/.git/objects/a7
9.5M	/root/.rpi-firmware/.git/objects/dd
9.5M	/root/.rpi-firmware/.git/objects/f2
9.8M	/root/.rpi-firmware/.git/objects/9b
11M	/root/.rpi-firmware/.git/objects/45
11M	/root/.rpi-firmware/.git/objects/5e
11M	/root/.rpi-firmware/.git/objects/75
11M	/root/.rpi-firmware/.git/objects/c4
11M	/root/.rpi-firmware/.git/objects/f3
12M	/root/.rpi-firmware/.git/objects/47
420M	/root/.rpi-firmware/.git/objects/pack
Can I safely remove this folder?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5288
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: /root/.rpi-firmware/.git/

Thu Oct 25, 2012 10:00 am

Yes. It's created by rpi-update. It is safe to remove, but means your next rpi-update will be slow when it is recreated.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: /root/.rpi-firmware/.git/

Thu Oct 25, 2012 10:04 am

So does this mean we need to reserve around 800MB just to update? If so someone with less than a gig of free space and an empty .rpi-firmware folder would lock themselves up. Wouldn't it?
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

Hexxeh
Posts: 91
Joined: Thu Apr 05, 2012 3:07 pm
Contact: Website

Re: /root/.rpi-firmware/.git/

Thu Oct 25, 2012 11:07 am

It really shouldn't be taking up this much space, I'll look into what's happening. You can safely rm -rf this folder and have it recreate next time, though.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: /root/.rpi-firmware/.git/

Thu Oct 25, 2012 11:28 am

Here is what I have under mine if it helps I have run the update 3 or 4 times usually it says ok and does nothing since I am updated.

Code: Select all

[email protected]:~/.rpi-firmware# du -hs /root/.rpi-firmware/.git/* | sort -h
4.0K    /root/.rpi-firmware/.git/branches
4.0K    /root/.rpi-firmware/.git/config
4.0K    /root/.rpi-firmware/.git/description
4.0K    /root/.rpi-firmware/.git/FETCH_HEAD
4.0K    /root/.rpi-firmware/.git/HEAD
4.0K    /root/.rpi-firmware/.git/ORIG_HEAD
4.0K    /root/.rpi-firmware/.git/packed-refs
4.0K    /root/.rpi-firmware/.git/shallow
8.0K    /root/.rpi-firmware/.git/info
32K     /root/.rpi-firmware/.git/refs
36K     /root/.rpi-firmware/.git/logs
40K     /root/.rpi-firmware/.git/hooks
156K    /root/.rpi-firmware/.git/index
29M     /root/.rpi-firmware/.git/objects
[email protected]:~/.rpi-firmware#
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

sharix
Posts: 200
Joined: Thu Feb 16, 2012 11:29 am
Location: Slovenia

Re: /root/.rpi-firmware/.git/

Thu Oct 25, 2012 5:57 pm

Thanks for info, I'll try to update with the folder deleted to see how long it takes.

edit:
We're running for the first time
Setting up firmware (this will take a few minutes)
fatal: destination path '//root/.rpi-firmware' already exists and is not an empty directory.
I guess the whole .rpi-firmware folder needs to be deleted, not just the .git inside it.

edit2:
the update took 4 minutes. now the folder is a lot smaller:

Code: Select all

sudo du -hs /root/.rpi-firmware/.git/* | sort -h
4.0K	/root/.rpi-firmware/.git/branches
4.0K	/root/.rpi-firmware/.git/config
4.0K	/root/.rpi-firmware/.git/description
4.0K	/root/.rpi-firmware/.git/HEAD
4.0K	/root/.rpi-firmware/.git/packed-refs
4.0K	/root/.rpi-firmware/.git/shallow
8.0K	/root/.rpi-firmware/.git/info
20K	/root/.rpi-firmware/.git/logs
28K	/root/.rpi-firmware/.git/refs
48K	/root/.rpi-firmware/.git/hooks
156K	/root/.rpi-firmware/.git/index
28M	/root/.rpi-firmware/.git/objects

nazouille
Posts: 28
Joined: Thu Jan 03, 2013 12:30 pm
Location: France

Re: /root/.rpi-firmware/.git/

Thu Jan 03, 2013 12:43 pm

I got the same issue.
I found the update very long so I have checked what's going on.

I have stooped the current git download then I relaunch the git command without the quiet option.
The first long thing was a compression thing done by the git server. The git command was talking about 27000 files.
After that, the pack file was about 450MB to download ...

Finally, I removed the .rpi-firmware folder then relaunch the command and after that the git download was smaller (26MB).

Return to “Advanced users”