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 want to have a list of all packages that are installed on my server but the command dpkg --get-selections > ~/Package.list doesnt do anything! When i execute it there is no file called "package.list" in the root folder.

Please help me its urgent.

share|improve this question
add comment

3 Answers 3

You have to run the same command (there's no need to run it as root)

dpkg --get-selections > ~/InstalledPackages.list

Then you can

cat ~/InstalledPackages.list

to see the content.

Now, if you are not sure how's ~ been processed, you can

cd ~
pwd

And that's it.

share|improve this answer
    
Well if i execute cat InstalledPackages.list i can see the file but with filezilla i am unable to find i want to export it to my pc –  user180429 Aug 1 '13 at 11:09
    
I mean no disrespect, but maybe you're looking in the wrong directory. Try cd ~ and then pwd, just to make sure you're working in the right directory. If you're pointing FileZilla to the right directory and the file isn't there, then you must check permissions for your file and the parent directory. Easy way, move it to /tmp/ –  0R10N Aug 1 '13 at 11:18
    
alright i found it now thanks for the help! –  user180429 Aug 1 '13 at 11:19
    
Glad to help :) –  0R10N Aug 1 '13 at 11:27
    
Is it safe to edit this Package.list? The reason is that I need to restore all packages on my fresh Ubuntu, but I am suspicious that some among these packages broke my system in the first place. Can I somehow edit them out? –  Anh Nov 18 '13 at 4:54
show 1 more comment

Use dpkg-query, this command is precisely intended to what you need: request on packages data‑base. A quick man dpkg-query will tell you more, however, you may try dpkg-query --list or dpkg-query -- show.

share|improve this answer
add comment

You said you've looked in the root folder, but with the "~" you are clearly pointing to the home folder. The root would be /Package.list, or -/Package.list. Check in the home folder.

EDIT: As I can see now, even though my answer was correct, it might have been unclear to a fresh user. I'm sorry for introducing additional confusion. @0R10N thanks for good example :)

share|improve this answer
add comment

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.