# Update packages?



## Spity (Jul 24, 2021)

A simple question: How do I update the packages installed on my system?
For example in Fedora I used: 


> dnf update



In Arch:


> pacman -Syu



On FreeBSD?


----------



## drhowarddrfine (Jul 24, 2021)

`pkg update`

Did you read the Handboook? It's quite clear.


----------



## hardworkingnewbie (Jul 24, 2021)

Please have a look at the forum rules, which clearly do state:
_
Before posting to any forum, please learn about how to best use the forums, such as how to help avoid frequently-repeated discussions, by reading their contents. Searching the forum is a quick way to see if someone has had your issue and if it has been answered. Forums can be searched within the Search page of this forum._

Your question falls into that category. RTFM.



drhowarddrfine said:


> pkg update
> 
> Did you read the Handboook? It's quite clear.


Nah, just the modern type of "I'm too lazy to use Google and instead ask right away don't caring about the impression I will make because my lazy approach always works fine for me..." internet user.


----------



## Spity (Jul 24, 2021)

I have installed Freebsd 13.0 1 month ago. Running pkg update doesn't give me any updates. It is normal? I thought I was doing something wrong.


----------



## T-Daemon (Jul 24, 2021)

See pkg-upgrade(8).


----------



## drhowarddrfine (Jul 24, 2021)

Spity said:


> Running pkg update doesn't give me any updates.


What does it give you?


----------



## Grzegorz Wiktorowski (Jul 24, 2021)

My workflow:

on Fedora 34
`dnf check-update`
`dnf upgrade`

on FreeBSD
`pkg version -vRL=`
`pkg upgrade`


----------



## SirDice (Jul 24, 2021)

pkg-update(8) only updates the locally cached catalog. You need pkg-upgrade(8) to actually upgrade your packages.


----------



## jmos (Jul 24, 2021)

Spity said:


> I have installed Freebsd 13.0 1 month ago. Running pkg update doesn't give me any updates. It is normal?


Maybe. First: As others said `pkg update` doesn't perform an update - it just updates your local database of available packages; Updates will be installed by executing `pkg upgrade` afterwards.

By default the packages you receive are built quarterly. Means: four times in a year. So if you already got the latest quarterly branch there might be none update for the next three months. On the quarterly branch a package will only get an update if there's a reason for - and not just because a newer version exists.

https://docs.freebsd.org/en/books/handbook/ports/ -> chapter 4.4.2


----------



## drhowarddrfine (Jul 24, 2021)

jmos said:


> Updates will be installed by executing `pkg upgrade` afterwards.


Let's maintain the correct terminology and point out that "update" updates the database while "upgrade" upgrades the package.


----------

