Benutzer-Werkzeuge

Webseiten-Werkzeuge


snippets:dpkg

Fun with apt-get & dpkg

Display installed packages

Source: http://askubuntu.com/a/17829

dpkg --get-selections|grep -v deinstall

(The -v tag „inverts“ grep to return non-matching lines)

Compile list of installed packages

Source: http://askubuntu.com/a/137991

Create a backup of what packages are currently installed:

dpkg --get-selections > list.txt

Restore installed package from list

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
snippets/dpkg.txt · Zuletzt geändert: 10.03.2016 12:55 von fwolf