Find the answer to your Linux question:
Results 1 to 9 of 9
I think that there's an apt command that will list the names of all of the packages that I've installed on my squeeze system, but I can't remember what it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2013
    Posts
    52

    What packages are installed?


    I think that there's an apt command that will list the names of all of the packages that I've installed on my squeeze system, but I can't remember what it is called. Could any of you please refresh my memory? I want to have this list so that I can install the same packages if/when I upgrade to wheezy.

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    I think you mean
    Code:
    dpkg --get-selections > somefile
    and then you can use
    Code:
    sudo dpkg --set-selections < somefile
    to reinstall them.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  3. #3
    Just Joined!
    Join Date
    Apr 2013
    Posts
    52
    Thank you, elija.

    I issued the --get-selections and it seems that the output contains everything that has been installed on my system. Is there any way to filter that so that only those packages that I installed show up in the list?

  4. $spacer_open
    $spacer_close
  5. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    There is a file called /var/lib/apt/extended_states which is supposed to show that information via an autoinstall flag, but it seems to be wrong. There is also the command
    Code:
    apt-mark showmanual
    but in my case that doesn't work either. YMMV.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  6. #5
    Just Joined!
    Join Date
    Apr 2013
    Posts
    52
    When you issue an "apt-get install" command, are the .deb files stored anywhere on the computer?


    There's a package called "aptoncd" that's supposed to provide what I'm looking for, but it doesn't work either.
    Last edited by BowCatShot; 06-25-2013 at 03:27 PM.

  7. #6
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    /var/cache/apt/ but I don't know if it is only packages manually installed. If I had to guess I would guess that it also contains all updates; which may be what you want.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  8. #7
    Just Joined!
    Join Date
    Apr 2013
    Posts
    52
    I found this set of log files

    history.log
    history.log.1.gz
    history.log.2.gz
    history.log.3.gz
    history.log.4.gz
    history.log.5.gz
    history.log.6.gz
    history.log.7.gz
    history.log.8.gz
    history.log.9.gz
    history.log.10.gz
    history.log.11.gz
    history.log.12.gz

    contained in /var/log/apt

    Which may contain info on each apt-get command that has ever been issued. TBD

  9. #8
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    Didn't know that was there but it looks like it contains everything including the original installation
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  10. #9
    Linux Enthusiast sgosnell's Avatar
    Join Date
    Oct 2010
    Location
    Baja Oklahoma
    Posts
    507
    I use Elija's solution every now and then. Yes, it lists everything installed, but it's better than nothing, and apt shouldn't reinstall packages already installed. Files that apt downloads are saved in /var/cache/apt/archives, but they can be deleted via clean or autoclean, so you won't see every package there if you've ever run any of the cleaning options of apt. I do that regularly to save space and prevent having outdated packages in the archives. It's easy and quick enough to download them as needed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •