I've done a fresh install of Ubuntu 18.04 today. I was before on a 16.10 release. I have been following the instructions of this page of french documentation : https://doc.ubuntu-fr.org/tutoriel/comment_sauver_et_restaurer_la_liste_des_paquets.

My purpose is to restore all my precedent packages on this new release. I'm confused, since i would like to restore only the packages i've manually installed, and not the ones brought by ubuntu 16.10, nor by the fresh install (minimal installation) of 18.04.

I've tried to compare the list of packages I've saved before installation with the file ubuntu-16.10-desktop-amd64.manifest using commands diff & cmp. I got the manifest file here : http://old-releases.ubuntu.com/releases/yakkety/

I got the list of packages with the cmd :

dpkg --get-selections > liste-des-paquets_`hostname`_`date +%Y-%m-%d-%H-%M`

So my questions are :

  1. Do I have to compare with both manifest files of 18.04 and 16.10 ?
  2. What would be the easiest way to compare files and to remove the bad entries ?

I thank you for your help.

EDIT : One progress toward the solution i've figured out is to make a list of the actual packages and compare them with diff with the list of the old packages

diff -yb --suppress-common-lines new_list_of_package_name old_list_of_package | grep -e ">" > change-to-add


cut -d ">" -f 2 change-to-add | cut -c 2- 

That way I get a list with all the lines i need potentially to sort. I still need to compare the list with the manifest file so i don't add old linux kernels i do not need.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.