# Automatically update packages with portmaster



## mfaridi (May 20, 2009)

I run cvsup every morning and I see many packages must upgrade and I start upgrade them manually and I use this command 


```
potmaster -D -u ftp/curl
```

sometimes many packages need upgrade and this process take many time for example take 3 or 4 Hour and this is bad 


can I do this automatically with portmaster for example in every night , when I do not use my system ?


----------



## SirDice (May 20, 2009)

I suggest not automating it. Sometimes ports need to be build in a specific order. This is indicated in /usr/ports/UPDATING. Automating it could render your system unusable and you'd have to rebuild things by hand.

Why not just start the upgrade process (after you've read UPDATING) by hand before you go to bed?


----------



## noobster (May 20, 2009)

You could update the ports tree, read UPDATING and act accordingly, and then run portmaster -auD before you leave your computer. If you insist on running it automatically then you could create an entry in the crontab.


----------



## hydra (May 20, 2009)

```
portsnap fetch update
portmaster -buda
```

However, be prepared to face the consequences...


----------



## jb_fvwm2 (May 20, 2009)

mfaridi said:
			
		

> I run cvsup every morning and I see many packages must upgrade and I start upgrade them manually and I use this command
> 
> 
> ```
> ...



You do not state whether you run multiple terminals.
For example, within the last ten hours or so,
p5-Test-File, p5-Test-Output, p5-DBD-SQLite all were
upgraded, and /ftp/filezilla/ had a minor verison bump.
Say I am running five terminals (tty0 tty1 etc)
I can csup or cvsup each individually (if you know the
syntax, I've posted it before).
then changing to another terminal (alt-f2 etc) one
can build the above 4 ports concurrently.  You can
browse or whatever in the original tty0, run
"make deinstall && make install && yell"
in another 4 terminals (tty1 tty2...tty4)
if you have /yell/ installed, and when the fourth
"yell" occurs. you can pause browsing in tty0 to
remove the new /work/ run pkgdb  -u , or
whatever else is usual. 
..............
Another trick I've only recently tried is 
noting ports with bump every two months and
are too time-consuming to rebuild, I (once so far)
write them down as a group, on paper, so I
can forget about the upgrade unless needed.


----------

