Making a list of packages to be installed on a new System

It is usefull to create a list of packages, to reinstall all of them easily, on a fresh new Linux box. I find it easier to save the package names in a file, separated one from another by space and to do this, on the freshly installed new Linux: cat package_list | xargs sudo apt-get -y install.

$ echo "package_1 package_2 package_3 package_99" > ~/.bak/package_list
$ cat package_list | xargs sudo apt-get -y install #this should be done on the new OS

Explenation:

cat opens the package_list file, and passes the content to apt-get as parameters. -y is for answering yes, to the installation process.

Tagged with: , , , , , , , , ,
Posted in The Linux and Unix Articles!
One comment on “Making a list of packages to be installed on a new System
  1. Cheap Michael kors says:

    I just added this page to my favorites. I enjoy reading your posts. Tyvm!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!