To get a list of packages installed locally do this in your terminal:
dpkg --get-selections | grep -v deinstall
To save that list to a text file called
packages
on your desktop do this in your terminal:dpkg --get-selections | grep -v deinstall > ~/Desktop/packages
(you don't need to run this as the superuser, so no
sudo
necessary here)Create a backup of what packages are currently installed:
dpkg --get-selections > list.txt
Then (on another system) restore installations from that list:
dpkg --clear-selections
sudo dpkg --set-selections < list.txt
To get rid of stale packages
sudo apt-get autoremove
To get installed like at backup time (i.e. to install packages set by dpkg --set-selections
)
sudo apt-get dselect-upgrade
Comments
Post a Comment