Reply To: Best approach to backup before upgrade from 21 to 23

Forum › Forums › New users › New Users and General Questions › Best approach to backup before upgrade from 21 to 23 › Reply To: Best approach to backup before upgrade from 21 to 23

#185550
Robin
Member

    I assume anything installed via apt is NOT manual (“apt install x” or “apt upgrade x, y, z”). Are packages installed via dpkg also captured in the same way that packages installed via apt are? If so, the only manually installed packages are those built from source, yes? (I will search for the app that lists manually installed

    Some considerations.

    This shows all packages installed manually in apt by the $ sudo apt-get install command. I guess, that dpkg installed packages are not included in the output.
    $ apt-mark showmanual

    And the following listing contains all originally installed packages in the ISO from which your system has been built, unfortunately without any hint whether manually or automatically.
    $ cat '/usr/share/antiX/installed-packages.txt'

    But you can check, which of the packages originally installed are right now marked as manually installed on your system, simply by running something like

    $ while read line; do pack=$(cut -d' ' -f1 <<<"$line"); apt-mark showmanual "$pack"; done <'/usr/share/antiX/installed-packages.txt'

    The packages returned were installed manually in the ISO most likely already, unless you have changed the status later on (e.g. by manually installing something which originally was installed automatically as a dependency.)

    You can save the output of the latter with the output of apt-mark showmanual to files, e.g. by piping, and then diff these files, which will return all packages you have added manually on your own. Then you have a listing, which packages you need to install on your new system to have the same programs available as before. For this, replace \n by blank, e.g. by
    $ tr '\n' ' '

    Example:
    $ while read line; do pack=$(cut -d' ' -f1 <<<"$line"); apt-mark showmanual "$pack" | tr '\n' ' '; done <'/usr/share/antiX/installed-packages.txt'

    and prepend the resulting string with
    $ sudo apt apt-get install

    Windows is like a submarine. Open a window and serious problems will start.