debian - installation based on a text file

Good day,

I have a list of packaages that i want  on my machine.   I can use it with apt-get to install the packahges i want.

My question is.. How can i make sure only the packages from  this list are installed and remove any packages that are not on this list.

example:    dkpg --get-selections < file.txt,  dkpg -u dselect-upgrade #Will install the list of packages.

How can i make sure that all other packages are removed??


Thanks.
icongoAsked:
Who is Participating?
 
TobiasHolmConnect With a Mentor Commented:
Here's a description to help you: http://www.debianadmin.com/clone-your-ubuntu-installation.html

Regards, Tobias
0
 
TobiasHolmCommented:
Hi!

The packages you've specified in the textfile are the ones that will be installed. Are more programs installed than the programs specified in the textfile?

Or do you want to remove unneccesary packages from the computer? Then you can use:
apt-get autoremove

Regards, Tobias
0
 
icongoAuthor Commented:
Basically, i have 2 machines with differetn packages installed.  Machine A and Machine B.

I want Machine B  to have the exact same packages as Machine A.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.