Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently had to opt for cleaning my cache through apt-get clean after getting lots of GPG errors during update. But it's created another problem for me since I want to create an "APTonCD" for backup.

I want to know how I could just get all the packages I've installed on my computer so that I could include them in my APTonCD. Is it possible to achieve that by selecting all installed packages in Synaptic for reinstallation but choosing to download those files only. I hope that option will leave my installed packages intact.

share|improve this question

2 Answers 2

The following command will download all your currently installed packages:

dpkg --get-selections | cut -f1 | xargs -n1 sudo apt-get install --reinstall --download-only
share|improve this answer
    
nice piping.... –  hbdgaf Dec 16 '10 at 13:00

dpkg --get-selections displays currently installed packages

you can do some cut on the output columns and manipulate the data however you like. I personally prefer using apt-mirror.

share|improve this answer
    
OK. Is it the same as selecting all installed packages in Synaptic for reinstallation, and then choosing to download only? I'd also be glad to learn how apt-mirror functions. –  Pawan Neupane Dec 16 '10 at 13:03
    
the other answer is exactly what you reference in comment...apt-mirror grabs entire repositories and builds a local repo for you(keeps it updated too if you schedule a cron job). apt-mirror is overkill for the exact aptoncd thing you are trying, but i like being able to install a given package that wasn't in my base system without a net connection. –  hbdgaf Dec 16 '10 at 13:06
    
OK. From what I understood from your comment, apt-mirror helps install even those files that haven't been installed and that too without internet. –  Pawan Neupane Dec 16 '10 at 15:02
    
correct. it copies all the packages on the selected repositories –  hbdgaf Dec 16 '10 at 15:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.