# Streamlining Upgrade Process



## usakhncit (May 12, 2021)

Hi
FreeBSD employs different commands to upgrade its different components. So in order to streamline this process, I have created following alias:

```
alias System-upgrade='sudo freebsd-update fetch install && sudo portsnap fetch update && sudo pkg upgrade'
```
Although, it works fine, however, (just out of curiosity) what's your opinion about it? Is it a correct practice? or should I run these commands manually (one after the other)?


----------



## zirias@ (May 12, 2021)

usakhncit said:


> what's your opinion about it?



Write any script or alias that automates things matching YOUR specific usecase, cause, why not? Makes sense!
Your alias name looks like it's taken from powershell   
Why have a ports tree (and update it with portsnap) if you're using packages?


----------



## usakhncit (May 12, 2021)

Zirias said:


> Write any script or alias that automates things matching YOUR specific usecase, cause, why not? Makes sense!
> Your alias name looks like it's taken from powershell
> Why have a ports tree (and update it with portsnap) if you're using packages?


I am using few packages from "multimedia" with PULSEAUDIO support. So, I have to use ports.
Powershell? Do you mean window's powershell? Ugh...


----------



## astyle (May 14, 2021)

usakhncit said:


> I am using few packages from "multimedia" with PULSEAUDIO support. So, I have to use ports.


Not a good idea to mix packages and ports. pre-compiled packages tend to lag behind ports. When you compile ports, they can pull in a truckload of dependencies in places you don't expect, and you can get forced into upgrades you don't really need or want. I've done that before, and it messed up my FreeBSD installs a few times, so I had to reinstall from scratch. For me, that is enough motivation to learn ZFS snapshotting.


----------



## usakhncit (May 15, 2021)

astyle said:


> Not a good idea to mix packages and ports. pre-compiled packages tend to lag behind ports. When you compile ports, they can pull in a truckload of dependencies in places you don't expect, and you can get forced into upgrades you don't really need or want. I've done that before, and it messed up my FreeBSD installs a few times, so I had to reinstall from scratch. For me, that is enough motivation to learn ZFS snapshotting.


Man usually learns from experience, rather than advice. So, let's see... how long I will take to learn "my lesson"


----------

