Save a copy of all debian packages in the form in which they are installed and configured on your system

for a in $(sudo dpkg --get-selections|cut -f1); do dpkg-repack $a|awk '{if (system("sleep .5 && exit 2") != 2) exit; print}';done
A copy of all installed debian packages on your system will be put back together, with all changes in configuration files you made and placed in the current directory. Make sure you have enough disk space (say 2-3 GB). Break any time with Ctrl+C.
Sample Output
$ ls -1
accountsservice_0.6.45-1ubuntu1.3_amd64.deb
acl_2.2.52-3build1_amd64.deb
acpid_2.0.28-1ubuntu1_amd64.deb
acpi-support_0.142_amd64.deb
...
^C
(Ctrl+C)

2
By: knoppix5
2021-01-17 17:07:02

What Others Think

I think you didn't test the command cuz it's fatally broken (my machine's an Ubuntu 20.04 LTS): ------- for a in $(sudo dpkg --get-selections|cut -f1); do dpkg-deb $a;done [sudo] password for : dpkg-deb: error: need an action option Type dpkg-deb --help for help about manipulating *.deb files; Type dpkg --help for help about installing and deinstalling packages. dpkg-deb: error: need an action option ------- The last 3 lines are repeated for every item.
rautamiekka · 13 weeks and 4 days ago
^ (Oh yeah, I forgot commanlinefu.com doesn't support lines in comments ... Sorry about that)
rautamiekka · 13 weeks and 4 days ago
This relies on every package having a DEBIAN folder associated with it. i.e if you were building every package yourself first. It is fatally broken. even with the required -b switch it won't work
Myso · 13 weeks and 4 days ago
Sorry people, my fault: I wrote "dpkg-deb" instead "dpkg-repack" in the command. Corrected!
knoppix5 · 13 weeks and 4 days ago
Submitting effective homework each time is incredible in light of some inevitable conditions. Assignment Help
hookstefan · 13 weeks ago
Fortunately I was able to find this after correcting these mistakes. I consider myself lucky! It's almost like with preorders- don't do it, wait for others to check http://www.bankopening.co.uk/>:D
anthcasell · 12 weeks and 6 days ago
Great post. Keep sharing codes such as a well-researched post. Your blog has helped me immensely. Would wait for more such posts soon. I will definitely share this here http://landscapinginkilleentx.com/">landscapinginkilleentx.com, might find it useful. Thank you
rickluck90 · 12 weeks and 3 days ago
I love spending time with amazing information like this. I really admire this wonderful and amazing website. Thanks for sharing this wonderful information with every one of us. I hope this would reach many people as possible. Please visit us here https://www.everettelectricians.com/ we are offering good quality services.
cjchuck · 12 weeks and 2 days ago
I love spending time with amazing information like this. I really admire this wonderful and amazing website. Thanks for sharing this wonderful information with every one of us. I hope this would reach many people as possible. Please visit us here https://www.everettelectricians.com/ we are offering good quality services.
cjchuck · 12 weeks and 2 days ago
Supersite! I am loving it!! I Will return once more, I'm taking your food additionally. I really admire this wonderful and amazing website. I hope more can read to know such information thank you so much for sharing this with us. I would like to invite you to visit our website. [url=https://www.riversidejunkhauling.com]riversidejunkhauling.com[/url]
vassist960 · 12 weeks and 2 days ago
Supersite! I am loving it!! I Will return once more, I'm taking your food additionally. I really admire this wonderful and amazing website. I hope more can read to know such information thank you so much for sharing this with us. I would like to invite you to visit our website. riversidejunkhauling.com
vassist960 · 12 weeks and 2 days ago
https://poetryus.com/ what a lovely post
leco9090 · 12 weeks ago
Thanks for superb information. Your web site is full of informative post . I recommend you to read my article on Typing test. It features different typing tests that can help improve your speed and accuracy when typing. There are also fun games that can be used for practice. https://en.gravatar.com/typingtestonline
JohnGrubb · 12 weeks ago
thank you for this! really appreciate you doing this [url="https://prestoplumbingjax.com/"]box[/url]
sammm · 11 weeks and 6 days ago
Thank you so much for this box
sammm · 11 weeks and 6 days ago
Thanks for this! Very informative! You can check out mathgoodies.com/
Alex40 · 11 weeks and 6 days ago
Thanks for the information keep sharing such informative post keep suggesting such post. mypascoconnect
MattieSan · 11 weeks and 5 days ago
Great website and information being shared! stamped concrete orlando
BonnieP · 11 weeks and 1 day ago
I definitely enjoying every little bit of it. It is a great website and a nice share. I want to thank you. Cheers from best laptop repair los angeles
keywave110 · 10 weeks and 6 days ago
Play klondike solitaire game.
blush · 10 weeks and 6 days ago
I am that worked out for you. For concrete resurfacing in Michigan, you should check our services.
charlesevans23 · 10 weeks and 2 days ago
Life is a journey, you don’t care about the destination, you care about the scenery along the way and the mood of seeing the scenery. https://www.gohotnet.com
goterllkk · 10 weeks and 1 day ago
Others laughed at me as crazy, I laughed at others and couldn't see through. [url=https://www.gohotnet.com/voipphone]web2[/url] web1 https://www.gohotnet.com
goterllkk · 10 weeks and 1 day ago
I think proper configuration can only help in this situation. Thanks for sharing about this. Visit our website to write my essay service
janafarber7 · 9 weeks and 3 days ago
I am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me as well as well as to others. Thanks. For wileyplus physics answers connect us
takeonlineclass · 9 weeks ago
Nice! Thank you for sharing amazing tips! Painters Darwin
Gale · 8 weeks and 1 day ago
Decent reaction consequently of this issue with firm contentions and clarifying everything on the subject of that.....find out more
Michelle08 · 8 weeks ago
Can I tell what packages are already installed on a Debian system? ... Note that this operation does not necessarily leave the package in a usable state;
Elizabeth76 · 7 weeks and 5 days ago
Can I tell what packages are already installed on a Debian system? ...Note that this operation does not necessarily leave the package in a usable state; crediblebh
Elizabeth76 · 7 weeks and 5 days ago
Kravitz's comment has received more than 1,360 likes while her Instagram post overall has received more than 396,840 likes as of Sunday evening. https://www.businesssitedirectory.com commercial real estate [url=https://www.businesssitedirectory.com/outdoorsrecreation]Outdoors[/url]
lotofsad1 · 7 weeks and 1 day ago
Very nice, Thanks for sharing the most important information I am so glad to visit this blog. We provide Graphic Design Courses. If you need any issues regarding the Graphic Courses visit our website...
graphicdesign11 · 6 weeks and 6 days ago
Great minds have purpose, others have wishes. https://www.goodcontentnet.com
jackfitt · 6 weeks and 3 days ago
each time i heard how tons disappointment the king will be, it changed into like a river of spring virtual phone system service
yuning · 5 weeks and 6 days ago
Ah, this is very nice. Thank you - https://www.pittsburghbrickrepair.com/
eduardonunez · 5 weeks and 2 days ago
Well done. Great for brick work.
eduardonunez · 5 weeks and 2 days ago
Good stuff www.primostumpgrinders.com
bizz888 · 4 weeks and 5 days ago
That's the trick https://www.dumpsterrentalstpete.com
bizz888 · 4 weeks and 5 days ago
Quality info Bay Area Dumpsters
bizz888 · 4 weeks and 5 days ago
This is the good stuff tree services and stumps
bizz888 · 4 weeks and 5 days ago
www.instagram.com/enri1que">Appreciated [url=www.instagram.com/enri1que]nice[/url] https://www.instagram.com/enri1que
Falk1993 · 3 weeks and 3 days ago
www.instagram.com/enri1que
Falk1993 · 3 weeks and 3 days ago
I was just wondering... I'm an android user now but I want to change it to that. How can I get started? financial advisor boise
aegyjingoo · 2 weeks and 6 days ago
There was once a blind man who had so fine a sense of touch that, when any animal was put into his hands, he could tell what it was merely by the feel of it. One day the cub of a wolf was put into his hands, and he was asked what it was. He felt it for some time, and then said, "Indeed, I am not sure whether it is a wolf's cub or a fox's: but this I know -- it would never do to trust it in a sheepfold." [url=https://www.newarticlelist.com/ecommerce]e-commerce business[/url] voip phone service
tian3556 · 2 weeks and 4 days ago
thanks to the author for taking his time on this one... Costco Austin
muneerahmed · 2 weeks and 3 days ago
Great information, thanks a lot higoodstuff.com
Joanlovecat · 2 weeks and 2 days ago
Very nice post. Keep sharing this post in the future. Thank you for sharing. Excellent post...! It is a very great idea and unique content. Thank you so much. website: Take My Online Test For Me
juliettaylor · 2 weeks ago
A very useful post. I request please give a more post to like this. How kind you are to help me. Thank you very much website: Take My Online Test For Me
clandiamobley · 1 week and 5 days ago
If you're interested mainly in usage of the relevant tools, skip to chapters Chapter 8, The Installation of software by the package system uses "dependencies" which are carefully This script typically completes any required configuration of the package foo once foo has Save the file, and reload it into dpkg database with paycheckrecords
Kenneth020 · 1 week ago
If you're interested mainly in usage of the relevant tools, skip to chapters Chapter 8, The Installation of software by the package system uses "dependencies" which are carefully This script typically completes any required configuration of the package foo once foo has Save the file, and reload it into dpkg database with paycheckrecords
Kenneth020 · 1 week ago
This purpose of this is to provide information about prime video activation. Users who are facing any problem to activate prime video in their smart TV, can read this and Visit our website. amazon.com/mytv www.amazon.com/mytv
rameshcfarm · 3 days ago
Thanks again for the blog article. Really looking forward to reading more. Want more. My site: http://www.rattleuganda.com/forums/users/eulalia9858/">???????
McauleyHanna · 18 hours ago
I was very encouraged to find this site. The reason being that this is such an informative post. Thanks for sharing! Painters
thamus · 17 hours ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: