The command cleans up the metadata about your specific commit on your system. So it makes the remotes ref’s (repo references) correct, and makes sure the data reflects your layering state.
Disk usage … are you using LVM? Your sysroot is pretty full. Maybe try sudo ostree prune to see if it can clean your tree a bit and get back some room.
# flatpak cleanup
flatpak uninstall --unused
#docker/podman cleanup
docker system prune -a
podman system prune -a
#Retain only the logs from last 2 days
journalctl --vacuum-time=2d
trying to do some cleaning, I found a big directory:
# pwd
/sysroot/home/gabx/.local/share/containers
# du -h --max-depth=1 | sort -hr
41G ./storage
41G .
84K ./cache
# ls -al storage/vfs/dir
drwx------. 37 gabx gabx 4.0K May 16 16:41 ./
drwx------. 3 gabx gabx 17 Dec 4 2018 ../
drwxr-xr-x. 17 gabx gabx 251 May 16 16:31 0c52ce3d656ab291187e9f90fcd847cdcd2d244f24cc04cf6b31f2016cbcfd85/
dr-xr-xr-x. 19 gabx gabx 254 Nov 29 2019 0f9a74ec05578deb3103199c4702ef0f516b5c66f0cca22af2002fc8e73fdb7b/
drwxr-xr-x. 4 gabx root 29 Dec 4 2018 108b1c56d076789d94323e2bcaa7eb926485f8fc841d6c08335f39412d94b71c/
.....
As you can see the /sysroot/home/gabx/.local/share/containers/storage/vfs/dir is a huge dir with lots of sub dir with names being a suite of letters and numbers. I don’t have any images orcontainers atm, so I wonder if I can clean this whole directory or not.
Btw I marked the topic as solved as the low space is not directly tied to my original issue.
Thank you for help
That dir can be deleted, if you don’t use containers you can delete the containers directory entirely. It looks like there is a container made in May of this year. If you used toolbox at any time those could be what you see. If you try listing containers with toolbox or podman, the ID’s are the long numbers at the end, but when you list them you only see the first 8 or so digits I think. toolbox-list for toolbox containers podman ps -a for podman to list any container on the system
Well that’s better. At least you should be able to update properly now.
Also after doing rpm-ostree cleanup -m to clear out the cache and flush any pending transactions or incomplete ones. Then try rpm-ostree refresh-md to refresh your repo metadata.