Slackware "dpkg" equivalent

One of the things I found really handy with Debian-based systems was the command

dpkg --get-selections > ~/my-packages

which would create a list of installed (and uninstalled!) packages. Then, if you had to rebuild your installed system from scratch, including removing default packages you’d deselected you could simply enter the command

dpkg --set-selections < my-packages && apt-get dselect-upgrade

and restore the system. I haven’t yet found an exact equivalent in Suse’s slackware-based system. YaST will create a list of installed packages which I assume can later be re-imported, but it doesn’t include deselected packages. Are there equivalent command-line commands using something like Zypper or YaST2 to carry out this task?

I don’t know where you get the idea that openSUSE is Slackware based. Slackware has a very basic packaging system, openSUSE’s is quite sophisticated and unrelated at all. Have a look at the command line tool zypper to see if that has commands to do what you want. Also the command line rpm program.

Well at one time suse was a spin off of slack according to this chart:

False info?

Yes, but that was so long ago. After that SuSE adopted the RedHat RPM packaging format and things have progressed so much since. The original question (about Slackware) is like asking if modern cars have any similarity to Model-T Fords. Whether what the OP wants can be done with zypper and rpm is a valid question though.

SUSE was a German translation of Slackware, which later on went its own way and is now pretty different in a lot of things compared to Slackware, which has been stuck a bit in the last century

Yes but the modern car does still take notes from a model-T, we still use wheels :wink:
Wheres my flying cars dangit! :’(

Sure, after all they are bits and bytes at the lowest level. I don’t think knowing the Model-T’s mechanics will help you service your flying car though. :stuck_out_tongue:

Too true, especially with the landing…

Still get the same fuel efficiency as well.

Why is everyone always in such a rush? :slight_smile:


It really wasn’t my intention to incite a discussion about the origins of SuSE, and I admit that my original characterization was tantamount to referring to Windows 7 as “DOS-based”. Basically I was simply groping for some adjective that suggested “different from Debian distros”. Apologies wherever due.

To get back to the original question, naturally the first thing I did was “info” Zypper, YaST2, and RPM; appearances to the contrary, I dare say I didn’t just fall off a passing cabbage truck, Linux-wise. An admittedly quick perusal of the results didn’t seem to indicate any exact equivalent of the dpkg commands, so I had hoped there might some old hands here. conversant in both Linux dialects, who might know how to implement this convenient Debian shortcut under SuSE. Any takers?

Have you checked the contributed software at to see if somebody has written some sort of utility to do what you want (clone a system’s packages, right?).

Maybe write some Perl/Phthon/Ruby scripts to massage the output of zypper and rpm to do what you want? If not there are various language bindings to the RPM database that could be used in programs to query the database.

:frowning: I think we’ve been naughty…

Sorry… Not a clue. How many packages are you removing?

I know kiwi can spin off live ISOs from installed systems, so presumably it must have some way of recording what’s going on… Might be worth a look.

I did also once find this… don’t know if it helps…

you can always request new stuff at