Results 1 to 5 of 5

Thread: Keeping a clean package situation

  1. #1
    Join Date
    Sep 2009
    Location
    Madrid
    Beans
    21
    Distro
    Ubuntu 9.10 Karmic Koala

    Keeping a clean package situation

    Hi all,

    Sometimes I install some program via Synaptic, and soon thereafter I realize that I don't need it anymore. Right, I go to Synaptic and uninstall the package. But that leaves all packages that where installed as dependencies unchanged, and my computer is full of not-needed packages.

    What I want is a way to store a list of installed packages which I know works well, and if later on I want to revert to that situation, just tell Synaptic or dpkg to install or uninstall any needed package and return to the situation of the list. I know there is a way to create the list with dpkg, but what about the next step? Is this feasible?

    Thanks in advance,

    Keta

  2. #2
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Keeping a clean package situation

    You can install deborphan to remove the remaining dependencies:

    http://www.debian-administration.org/articles/134

    Then to find all the packages try:

    Code:
    sudo dpkg --get-selections > myPackages
    This will create a file in your user directory with all installed packages.

    You may want to run:

    Code:
    updatedb
    First. Hope that helps.

  3. #3
    Join Date
    Jun 2005
    Beans
    22
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Keeping a clean package situation

    How about:

    sudo apt-get autoremove && sudo apt-get clean

    Does that do a similar thing?

  4. #4
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Keeping a clean package situation

    apt-get clean removes everything except lock files from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. Thus, if you need to reinstall a package APT should retrieve it again.

    apt-get autoclean removes only package files that can no longer be downloaded.


    http://www.debian.org/doc/manuals/ap...n.html#s-clean

  5. #5
    Join Date
    Sep 2009
    Location
    Madrid
    Beans
    21
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Keeping a clean package situation

    Thanks for the answers guys.

    I did a try with deborphan, but
    Code:
    deborphan -a
    listed many packages I do not want to deinstall. For instance, it lists stellarium, but I definitely want to keep it. Should I use another command? (The link you post in the first reply isn't working right now.)

    As for dpkg, --get-selections is indeed what I wanted to store the list of packages. Isn't there a way to tell dpkg to read the list and let him perform any needed task to return to the state specified in the list? What about --set-selections, how is it used?

Bookmarks

Posting Permissions

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