# [HOWTO] keeping the system fully updated

## kolcon

Do you want to keep your system up-to-date as much as possible?

Try the following steps:

 Regular update 

 update your portage 

```
 emerge --sync 
```

 (optional) update your layman overlays

```
 layman -S 
```

 check what would be updated

```
 emerge -upvND world 
```

 (optional) amend the use flags

```
 vi /etc/make.conf 
```

 for system-wide changes or

```
 vi /etc/portage/package.use 
```

 for packages-level changes

 run the update

```
 emerge -uND world 
```

 emerge live packages (if any)

```
 emerge @live-rebuild 
```

 review the messages given and take actions recommended there

```
 less /var/log/portage/elog/summary.log 
```

 or use

```
 elogv 
```

 if you get messages about changes in etc-files, run

```
 etc-update 
```

 and merge the files as you see fit

alternatively use

```
 dispatch-conf 
```

 if you emerged xorg-server, re-emerge all xf86-input- and xf86-video- modules,

that you are using

```
 emerge -av `qlist -I -C x11-drivers/` 
```

 Extra optimizations - no need to run them every time

 check if something can be removed

```
 emerge --depclean -p 
```

, then when you are happy with the output

(if it wants to remove packages you need to keep, add them to /var/lib/portage/world)

```
 emerge --depclean 
```

 emerge packages using obsolete libraries

```
 emerge @preserved-rebuild 
```

 make sure the system is consistent

```
 revdep-rebuild 
```

 check if the .la files are consistent (you may need to emerge dev-util/lafilefixer first)

```
 lafilefixer --justfixit 
```

 check if the perl modules are updated for the current perl version

```
 perl-cleaner --reallyall 
```

 check if the python modules are updated for the current python version

```
 python-updater 
```

 update the usb and pci id definitions

```
 update-pciids 
```

```
 update-usbids 
```

 delete old unused kernel sources

```
 rm -rf /usr/src/linux-2.6.XX-gentoo-XX 
```

```
 rm -rf /lib/modules/2.6.XX-gentoo-XX 
```

 cleanup your distfiles

```
 eclean distfiles 
```

Last edited by kolcon on Sun Oct 17, 2010 1:56 pm; edited 8 times in total

----------

## aCOSwt

 *kolcon wrote:*   

> [*] check if the .la files are consistent (you may need to emerge dev-util/lafilefixer first)
> 
> ```
>  lafilefixer --justfixit 
> ```
> ...

 

I share the opinion of those who consider that lafilefixer should not be run systematically. i.e. without some specific good reason to do so.

As step 6, I would as well invite people to read /var/log/portage/elog/summary.log and take appropriate actions as advised

----------

## kolcon

 *aCOSwt wrote:*   

>  *kolcon wrote:*   [*] check if the .la files are consistent (you may need to emerge dev-util/lafilefixer first)
> 
> ```
>  lafilefixer --justfixit 
> ```
> ...

 

thanks, changes incorporated...

----------

## d2_racing

You can even run elogv just to be sure that you haven't miss something.

----------

## rh1

What package does "elogv" come from? Seems i don't have it installed.

----------

## kolcon

 *rh1 wrote:*   

> What package does "elogv" come from? Seems i don't have it installed.

 

app-portage/elogv

----------

## d2_racing

Also, you will need to had this inside your /etc/make.conf :

```

PORTAGE_ELOG_CLASSES="log warn error info"

PORTAGE_ELOG_SYSTEM="echo:log,error,warn,info  save:log,error,warn,info syslog:log,error,warn,info"

```

----------

## d2_racing

Elogv is a little program that give us all the portage message but per package.

----------

## rh1

Thanks, I had mine set up for save_summary but now switched to save and emerged a few things so i could try it., have to say elogv is much nicer.

 *Quote:*   

> 
> 
> ```
> PORTAGE_ELOG_SYSTEM="echo:log,error,warn,info  save:log,error,warn,info syslog:log,error,warn,info" 
> ```
> ...

 

I didn't see this syntax in the handbook, or anywhere else. Handbook just says about a space seperated list. Looks interesting, I thought you could only list the classes all in PORTAGE_ELOG_CLASSES. I never realized I could define different  options for save and syslog.

If you would indulge me, I'm curious as to what the "echo" part does.

----------

## d2_racing

I don't know about the echo part, I copied that line from someone  :Razz: 

----------

## kolcon

added the xorg-server part

----------

## d2_racing

You can even run this :

```

# emerge -1v $(qlist -IC x11-drivers)

```

----------

## Jallee

Here is one more..

```
eclean distfiles
```

----------

## norg

 *kolcon wrote:*   

> 
> 
> [*] if you get messages about changes in etc-files, run
> 
> ```
> ...

 

Isn't the new option "dispatch-conf" that's recommended?

----------

## slycordinator

Assuming you have eix installed, instead of doing 

```
emerge --sync
```

 followed by 

```
layman -S
```

 just run 

```
eix-sync
```

 instead.

And even if you didn't use layman, this syncing method would be preferred because it updates the little database that eix uses automatically (instead of you syncing then separately telling eix to recreate the database).

----------

## FelixPetzold

Have a look at https://forums.gentoo.org/viewtopic-t-827398.html (last post)

----------

## kingfame_147

Some suggestions:

1) Instead of using 

```
emerge @live-rebuild
```

 use app-portage/smart-live-rebuild instead. It just rebuilds packages that has changed. So it would be 

```
 emerge @smart-live-rebuild
```

2) 

```
emerge -1v $(qlist -IC x11-drivers)
```

 seems to be outdated, there is now 

```
emerge @x11-module-rebuild
```

----------

