-
Hey there, Recently switched to 23.11 release to utilize Is there a provided method to free up some storage? Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
On March 12, 2024 10:19:45 PM GMT+01:00, "O. C. Taskin" ***@***.***> wrote:
Hey there,
Recently switched to 23.11 release to utilize `terminal.colors` but I've
noticed the storage usage is roughly doubled. The usual `nix profile
wipe-history` and `nix-store --gc` doesn't seem to help, I can see many old
generations still with `nix-on-droid generations`.
Is there a provided method to free up some storage?
Cheers
nix-collect-garbage?
|
Beta Was this translation helpful? Give feedback.
-
nix-collect-garbage?
Unfortunately didn't change the situation.
For context The storage used before was ~11GB, changing the flake input to
`release-23.11` (and updating the `system.stateVersion` accordingly) ended me
up at ~24GB.
|
Beta Was this translation helpful? Give feedback.
-
Can you check for existing gcroots that may cause unneeded packages? See /nix/var/nix/gcroots Sounds like you still have packages of the old nixpkgs version laying around. Otherwise you could try and analyse the closure size of your current nix-on-droid generation. |
Beta Was this translation helpful? Give feedback.
-
Can you check for existing gcroots that may cause unneeded packages? See /nix/var/nix/gcroots
``` sh
bash-5.2$ tree -L 2
.
├── auto
│ ├── 00cmlzsd79paq3743sby0849nhjr3xbb -> /nix/var/nix/profiles/per-user/nix-on-droid/profile-1-link
│ ├── 22fzpr978inryy8vx76h64lsrxc8hkff -> /nix/var/nix/profiles/nix-on-droid-5-link
│ ├── 2pr6qql4vl4dgk5zbbg685rfv94p5wm6 -> /nix/var/nix/profiles/nix-on-droid-13-link
│ ├── 3m4dxdzgghp3iy17qrjqiz38h32hi6lb -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-5-link
│ ├── 5cp821izhnqb7ixsaymijrjsfvfqdgra -> /nix/var/nix/profiles/nix-on-droid-1-link
│ ├── 5f7d9kfckccq1ipxf9y0nfpbbiz4rkqi -> /nix/var/nix/profiles/nix-on-droid-4-link
│ ├── 5qfk5ficn88yq9as65dl66fps7whsds0 -> /nix/var/nix/profiles/per-user/nix-on-droid/profile-2-link
│ ├── 5xi2wwd32ypir866r827hs07fl5mfg3d -> /data/data/com.termux.nix/files/home/.cache/nix/flake-registry.json
│ ├── 79kcqk1spw126yg5c7whsn8klq18lm73 -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-8-link
│ ├── 7amww29jwkzijri2zm53xw2gnnhqf8mx -> /nix/var/nix/profiles/nix-on-droid-6-link
│ ├── 7lsginma9pjj8n0n65w2hsdr6hmlgw9x -> /nix/var/nix/profiles/nix-on-droid-9-link
│ ├── 7n3r6928g9m0wlh9jxyc63j35w78nlci -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/profile-13-link
│ ├── 7ry630yn9piv28m4j4w5as8dal0v0vi6 -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-10-link
│ ├── 82v2n8xjkmmj775m2wh7iy0fsq21dy1w -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-12-link
│ ├── 86v1c4qk1jflqf218kg1r0m7irh0g4m3 -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-2-link
│ ├── cgla2hc718fnxvn8z1hqr0p2d4n4ywz8 -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-6-link
│ ├── d27yb1281cdxrl1s21n7l7zpl2b3q41s -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-7-link
│ ├── dsiwz9fw4wxn8x2sj6f5876b9qdvz403 -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-13-link
│ ├── fni95gkq826xnmygsf0804jhblm9x1ha -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-15-link
│ ├── ip2dw1ndws9sgdbasj2g752g1xns8z1a -> /nix/var/nix/profiles/nix-on-droid-12-link
│ ├── m5zi5nhn9x0pd9ympqgmjlfn26k56v5d -> /nix/var/nix/profiles/nix-on-droid-16-link
│ ├── m9mn2wijbciiz4w4lx395dqxx3yixwc9 -> /nix/var/nix/profiles/nix-on-droid-2-link
│ ├── n59bhs65sx6bi521hlpak5h9rbj276jg -> /nix/var/nix/profiles/nix-on-droid-17-link
│ ├── nkf64ypg1yq1s41qacz6cx02f6c3yz42 -> /nix/var/nix/profiles/nix-on-droid-7-link
│ ├── nrnzcsy58s6n56yc5n9lrg4s8aw5p54r -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-4-link
│ ├── p0dxqn94vg9jnjdrbjri6w0mpisfkv7q -> /nix/var/nix/profiles/nix-on-droid-14-link
│ ├── pyrjpx2ksxa6kmqx3ajhpynscarbpwrl -> /nix/var/nix/profiles/nix-on-droid-11-link
│ ├── qfm3wl13knc43v3g9d6s0c9jdqjbbc72 -> /nix/var/nix/profiles/nix-on-droid-10-link
│ ├── qmpwvvxw66l8bbal0mhsbm6grh5hi0sx -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-1-link
│ ├── qq1xgq354m3h8np3z8rh3jkpm5jlagww -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-11-link
│ ├── sp2pq3dfvi281p6y0r6ihbgxzdqp9q8w -> /data/data/com.termux.nix/files/home/.local/state/home-manager/gcroots/current-home
│ ├── vgf53k9fgc9yr805j9qcxvcq4p0nmvxc -> /nix/var/nix/profiles/nix-on-droid-8-link
│ ├── vid1ihm99fa8nm6d9imys0qi1hvima9p -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-14-link
│ ├── x4m8hl1nbqfqr9101750rffafk40jryq -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-9-link
│ ├── yj00m7qak01byvm4kvrw8gihh7hbrplf -> /nix/var/nix/profiles/nix-on-droid-15-link
│ ├── zdbxq6rlagpc379g67xh1njg8d52jm6z -> /data/data/com.termux.nix/files/home/.local/state/nix/profiles/home-manager-3-link
│ └── zp0wnw17qyywmml5d9g8akmdqhiifcsa -> /nix/var/nix/profiles/nix-on-droid-3-link
├── per-user
│ └── nix-on-droid
└── profiles -> /nix/var/nix/profiles
```
Otherwise you could try and analyse the closure size of your current
nix-on-droid generation.
Sadly this surpasses my newbie knowledge. Could you elaborate in case the above
doesn't lead to anything?
|
Beta Was this translation helpful? Give feedback.
-
You can run `nix-collect-garbage -d` to remove all unused packages.
Alright, my go-to was `nix-store --gc`, which I ran couple of times before
asking this question. And it wasn't deleting pkgs from store anymore.
For some reason (perhaps after killing the app or after removing the wakelock)
now it started collecting garbage again, back to ~10GB.
Cheers
|
Beta Was this translation helpful? Give feedback.
You can run
nix-collect-garbage -d
to remove all unused packages. Have a look atnix-collect-garbage --help
for more options.