I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system. I even want to be able to uninstall unwanted ones. How would I do this?
Asked
Active
Viewed 52 times
0
-
4Does this answer your question? [How to list all installed packages](https://askubuntu.com/questions/17823/how-to-list-all-installed-packages) and [Generating list of manually installed packages and querying individual packages](https://askubuntu.com/questions/2389/) – karel Jan 31 '20 at 07:31
-
How will you know which packages are "unwanted"? Parsing the dependency chains can be tedious. It's usually easier to build up what you want from a [Netinstall (minimal) image](https://help.ubuntu.com/community/Installation/MinimalCD) than to tear down from a Desktop or Server Image. – user535733 Jan 31 '20 at 13:22
1 Answers
0
I doubt, that this is a very good idea, but can do the following:
# Get packages from Host A
dpkg --get-selections | grep -v deinstall > outfile
# Install packages from Host A on Host B
sudo dpkg --set-selections < outfile
BulletBob
- 1,750
- 2
- 7
- 12