Upgrading a Debian system

We will assume that we want upgrade from etch (older stable)  to lenny (current stable):
  1. Edit file /etc/apt/sources.list and replace  substituimos todas las ocurrencias de  ecth por lenny: 

    sudo vi /etc/apt/sources.list

  2. Repositories updating: 

    sudo aptitude update

  3. Upgrading the management tools Debian packages: sudo aptitude install apt dpkg aptitude
  4. Upgrading all the system: 

    sudo aptitude full-upgrade