Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Skip to primary content

Programming in Linux
Show me the code

Search
Main menu
• Home
• About
• Contact
• License
Post navigation
← PreviousNext →

dpkg –get-selections: Get the Current


State of Your
Ubuntu/Debian machine
Posted on May 12, 2010
dpkg can be used for a variety of purposes. It can be used to install and remove packages. But
one of the best feature which you can use is to save the current state of your machine.
What is current state of your machine?
You may be wondering what does the current state means. Your ubuntu/debian machine is a
collection of many packages. Every time your machine crashes, apart from losing the valuable
data, you may also lose the information about various packages you installed in your machine.

dpkg –get-selections gives the list of all package names and their current state like installed,
deinstalled etc.
$ dpkg --get-selections
acpi-support install

acpid install

adduser install

adium-theme-ubuntu install

aisleriot install

akonadi-server install

....

You can save the settings into a file using tee.


$ dpkg --get-selections | tee packages_list

acpi-support install

acpid install

adduser install

adium-theme-ubuntu install

aisleriot install

akonadi-server install

....

You can make use of the file packages_list in many ways. Save it in your mail, so that you can
use it later or even use it to clone another machine in a similar way.
SHARE THIS:

• Twitter
• Facebook
• Reddit

RELATED
dpkg tutorial – Package Manager for Ubuntu / DebianMay 14, 2010In "dpkg"
dpkg –set-selections: Clone your Ubuntu Machine (package state)May 13, 2010In "dpkg"
How to interpret the status of dpkg (–list)?May 11, 2010In "dpkg"

This entry was posted in dpkg, Linux, Ubuntu and tagged Dpkg, dpkg get-selections, ubuntu current
state, ubuntu package installation, ubuntu packages by multilingualjourney. Bookmark the permalink.

Leave a Reply

Create a free website or blog at WordPress.com.

▪ Follow

You might also like