OSTREE-REFS(1)

✨ OSTREE-REFS πŸ’…

okay so bestie, this is the manual page for ostree refs from the ostree suite, and I'm gonna walk you through it like we're texting in the group chat. no cap, it's actually super useful. let's get into it 🫢


🌸 NAME 🌸

ostree-refs β€” literally just list refs, that's it, that's the whole vibe ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

ostree refs [OPTIONS...] [PREFIX]

ostree refs {EXISTING} {--create=NEWREF}

πŸ’– DESCRIPTION πŸ’–

So basically this command lists all the refs chillin' on your host. if you pass a PREFIX, it assigns the refspec prefix β€” and the default prefix is null, which means it just lists all the refs, no filter, the whole buffet πŸ“.

and here's the plot twist: this command can also create or delete refs. it's giving multitalented main character energy, honestly πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • --list β€” okay so for historical reasons (iykyk), if you don't pass this option, refs get the specified prefix stripped from the output. but bestie, normally you wanna see the full ref, right? so passing this option means the refs are printed in full instead of truncated. slay πŸ’…
  • --create=NEWREF β€” creates a ref pointing to the commit EXISTING. important: NEWREF must not already exist, and EXISTING must be an existing commit. also, more than one ref can point to the same commit, so no jealousy there πŸ’–
  • --delete β€” deletes refs that match PREFIX instead of listing them. and heads up: if you're trying to reclaim space, you'll then need to run ostree prune or ostree admin cleanup. like, this option is not the whole cleanup, it's just step one, okay? 🧚
  • --revision, -r β€” when you're listing refs, this also prints their revisions. the revisions get separated by a tab character. cute and organized ✨
  • --alias, -A β€” if you use this with --create, it creates an alias. otherwise it just lists aliases. simple as that πŸŽ€
  • --collections, -c β€” enables interactions with refs using the combo of their collection IDs and ref names. when listing refs, this changes the output format to include collection IDs, and it enables listing remote mirrored refs. when creating refs, the refspec value you pass to --create gets treated as COLLECTION-ID:REF-NAME and a mirrored ref is created β€” and yes, the manpage itself calls this "(This is an abuse of the refspec syntax.)" so like, iconic but chaotic πŸ’€. when deleting refs, all refs whose collection ID equals PREFIX get deleted. periodt.
  • --force β€” when creating NEWREF with --create, this allows an existing ref to be updated instead of erroring out. like a "yeah yeah I know it's there, overwrite it anyway" button πŸ”₯

🌈 EXAMPLE 🌈

$ ostree refs

            my-branch
            gnome-ostree/buildmain/x86_64-runtime

see? just a lil list of refs, living their best lives 🌸


ngl bestie, the --collections option is doing the most, but the manpage literally admits it's an abuse of the refspec syntax, so we respect the honesty πŸ’œ

and that's the whole page! written by the OSTree girlies, dated OSTREE REFS(1), and delivered to you with love 🫢✨

πŸ“¦ where this page comes from