Exploring PKG command | I've learned something new!

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024
  • PKG is a small command with a large presence in FreeBSD - and an even larger range of command switches... in this video we'll show a few, and I learned some new ones.
    Plus an update on health (it's not life threatening)
    ---------------------------------------
    Discord: / discord
    Odysee: odysee.com/@Ro...
    odysee.com/$/i...
    Rumble: rumble.com/user...
    Twitter/X: x.com/RoboNuggie
    BitChute: www.bitchute.c...
    Ko-Fi : ko-fi.com/robo...
    ---------------------------------------
    Music:stage7 = / 8-bit-mentality
    ----------------------------------------
    #RoboNuggie #FreeBSD #GhostBSD #helloBSD #NomadBSD #BSD

ความคิดเห็น • 41

  • @_sebastien
    @_sebastien 4 หลายเดือนก่อน +8

    Great one! I recently discovered "pkg prime-list" which presents all the packages manually installed using "pkg install", whereas "pkg info" lists all the installed packages (both manually and automatically, aka dependencies).

    • @mirror1766
      @mirror1766 4 หลายเดือนก่อน +3

      I usually save a `pkg prime-origins` as a list of what my system needs installed to be how I want it. Your command saves flavors while mine excludes them; each has their advantages though I normally have not made intentional use of them myself.

  • @unix4you2
    @unix4you2 4 หลายเดือนก่อน +4

    Thanks RN. I Think that some times people forget that the commands has a Lot of modifiers and use just a few options.

  • @mirror1766
    @mirror1766 4 หลายเดือนก่อน +3

    Maybe I missed it, but what new thing did you learn?
    To save time, `pkg info -a` and `pkg info` should return the same results.
    Manually installing a package marks it as such and it is excluded from autoremove but its dependencies are fair game so upgrading/uninstalling it can have that debris cleaned up. If you see too many things listed, `pkg set -A 0 pkgname` will set it to not be removed and dependencies will get ignored accordingly. Change 0 to 1 to undo that. You should not need to set '0' for anything you manually installed but if it got brought in as a dependency you want to keep then make sure to set it to not lose it. The command is a powerful cleanup and tedious to do manually so it is worth resolving its output.
    If too much is being removed, you likely lost a package you wanted to keep. Always review any removals on pkg upgrade and install steps. A package failing to build when the repository was updated or two packages not being compatible can cause this.
    Last I tried locking a package I found that dependencies were updated anyways and the package was broken. I thought I saw a change to pkg I thought may be to fix that but haven't tested.
    remove and uninstall are aliases to delete so that you don't have to remember them exactly; its far more useful than an error message saying 'you screwed up so we will do nothing' like some similar programs I use do. Maybe deinstall should get added as a remnant of ports tree commands.
    `pkg updating` is worth reviewing for updates. It includes steps and things users need to know to use updates properly and successfully.
    If you need a break from talking to us and making videos, `pkg query -e "%M != ''" '%o: %M' | less` can help keep you company for a while. Hope you get well soon.

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      I didn't know a about the use of query, especially the filtering of where the packages where installed from, and the pkg which... like I said I only use pkg in it's simplest form.... I've also picked up a few new things from your comment!
      Cheers mirror, very helpful :-)

    • @mirror1766
      @mirror1766 4 หลายเดือนก่อน

      @@RoboNuggie pkg writes all details about packages in a database, pkg query is how to get to that data. The final command I gave is useful to get messages from installed packages (re)displayed.

  • @user-mr3mf8lo7y
    @user-mr3mf8lo7y 4 หลายเดือนก่อน +6

    su - (su + dash is recommended to establish ENV settings properly.)

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      Yup, my bad.... :-(

  • @RogerioPereiradaSilva77
    @RogerioPereiradaSilva77 4 หลายเดือนก่อน +3

    Get well soon, good sir!

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      Thank you!

  • @urriell_8069
    @urriell_8069 4 หลายเดือนก่อน +3

    Thanks for the video. Recover quickly :))

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      Thank you!

  • @derekr54
    @derekr54 4 หลายเดือนก่อน +2

    Really interesting video Chris and I hope you recover quickly.

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      Thanks 👍

  • @wildmanjeff42
    @wildmanjeff42 4 หลายเดือนก่อน +2

    Thanks for the information Christopher, I had heard of pkg info, but never used it and forgot about it.

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      Cheers Jeff.... I had only used the basics, so I learnt a lot from this.... don't let the videos give you the impression I am the Oracle of all knowledge :-) Shhh...

    • @wildmanjeff42
      @wildmanjeff42 4 หลายเดือนก่อน

      @@RoboNuggie I think many would disagree. You are quite the Professor when it comes to how FreeBSD works. Many have gained from your videos over the years !

    • @williamwallis1
      @williamwallis1 4 หลายเดือนก่อน

      Excellent insight into the pkg command. I've used lock on the nvidia drivers on an older system, its awesome.

  • @BSDJedi
    @BSDJedi 4 หลายเดือนก่อน +4

    Very informative. Thank you. Sometime back I created a video explaining how to convert that local cache into a PKG repo and, yes, it does take a lot of space. On the good side, you can burn the packages into a BlueRay, and have it "handy" all the time 🙂
    Chris - I sincerely wish you a quick and full recovery. There is nothing more important than our health... Take care :-)

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      I'll go back to that video.... would be super useful..... thank you mate :)

  • @subynut
    @subynut 4 หลายเดือนก่อน

    Thanks for doing this! I knew a few of those commands but not all of them. The audit capability is very good to know!

  • @RonnieRedd
    @RonnieRedd 4 หลายเดือนก่อน +5

    ZFS has a TON of really cool tools you might want to go down the rabbit hole 😮😊

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      Not a bad idea..... the problem with me is that I tend to use things on a basic level, so this seems like a good idea....it will go in the ideas list - much appreciated, thank you!

    • @user-mr3mf8lo7y
      @user-mr3mf8lo7y 4 หลายเดือนก่อน

      Never understood the need for ZFS in 99% of our BSD lifes.

  • @mohscorpion2
    @mohscorpion2 4 หลายเดือนก่อน +2

    thank you nice video as usual, i hope and wish you get better soon

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน +1

      Thank you!

  • @notgiven3114
    @notgiven3114 4 หลายเดือนก่อน +2

    Hey Robonuggie, how about some videos on some important topics that nobody ever talks about, like how to recover from an OS disk failure in a mirrored pair?
    Another good one would be how to configure a database server on a LAN, and have multiple workstations simultaneously interact with it (for example, say one wanted to write some code that provided a user interface to salespeople entering orders on their workstations but have all the data (from each workstation) going into the same database on the server as orders are asynchronously entered.

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      I'll put them in the ideas list, if I can't do them, I;ll pass them on to someone who can :-)

  • @RonnieRedd
    @RonnieRedd 4 หลายเดือนก่อน +2

    Very nice 😊

  • @po3chleb3
    @po3chleb3 4 หลายเดือนก่อน +2

    Very very usfull film. Thanks Robonuggie

  • @toomanysecrets1969
    @toomanysecrets1969 4 หลายเดือนก่อน +2

    I'm sorry, but every time I see a 'su' without the hyphen ("su -"), a small part of me dies (and at this point, I think I'm almost a zombie) 😂😂😂😂😂😂

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน +2

      Yes.... I take your meaning.... do you know why it makes a difference? I ask because I haven't really seen any reason to.... just asking for a friend :-)

    • @toomanysecrets1969
      @toomanysecrets1969 4 หลายเดือนก่อน +2

      @@RoboNuggie If you don’t include the hyphen, then you are assuming the user BUT WITHOUT ANY of their environment variables, you are using the user (in this case 'root') with all the environment variables of your user from where you execute the 'su'. However, if you include the hyphen, all the environment variables of the user you want to access (in this case, root) are loaded. That’s why it’s important to never forget the hyphen, because depending on what you do, it can even be counterproductive.

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน +2

      Thank you, you know I'm never shocked that I think I know things are a certain way when in fact I have them upside down. I'm always willing to learn and correct, so I'll make sure I do that from now on especially - and again, thank you or taking the time to explain :-)

    • @toomanysecrets1969
      @toomanysecrets1969 4 หลายเดือนก่อน +2

      @@RoboNuggie That's UNIX!! You never know enough. It's the way of the learning ☺️ This is the reason I love UNIX world; because you never stop learn

    • @toomanysecrets1969
      @toomanysecrets1969 4 หลายเดือนก่อน +2

      @@RoboNuggie By the way my name is Manuel (aka TooManySecrets). It's a pleasure to "talk" with you 😃

  • @peterdambier
    @peterdambier 4 หลายเดือนก่อน +1

    lifesaving: pkg delete -D gnuplot | gnuplot can be a universal tool like a wrenge but in my case it behaved more like a spanner stuck in the gears. pkg upgrade would block because of a broken script in gnuplot. Not even remove or delete would work. delete -D prevents install scripts from running and finally got it.

  • @hiYouareaclown
    @hiYouareaclown 4 หลายเดือนก่อน

    Isn't this a replica of the apt command?

    • @RoboNuggie
      @RoboNuggie  4 หลายเดือนก่อน

      Well, it's FreeBSD's package manager, so in that respect it's similar but not a replica....