Results 1 to 5 of 5

Thread: Using APT-GET Quick Reference

Hybrid View

  1. #1
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Post Using APT-GET Quick Reference

    Using apt-get
    This is a small quick reference post on using apt-get in BT
    There is a ton of info about it throughout the internet. I merely wanted to post the basics for those that may be to lazy, or unwilling to look elsewhere.
    So first and foremost:
    There are 3 basic installers in BT4 apt-get the basic command line package
    management system. aptitude is a curses based front end for apt-get.
    And synaptic which is a gui version. Other than that there really are no major
    differences.
    Now lets look at some of the commands that are available for us.
    First
    Code:
    # man apt-get
    The manual page read it.
    Code:
    # apt-cache pkgnames
    Gives us the names of all the installed packages we have on the system.
    The list is not really to organized so add a | pipe and sort to the end and then it will alphabetized.
    Code:
    # apt-cache search programname
    add the name of a program that you want to search for. The command will show software packages with the expression you entered. One problem with apt is that it really needs the exact name of a package for better results.
    Code:
    # apt-get install packagename
    Pretty simple since all the work is now done for you.
    There is a caveat to this method of package installation. You can't pass any
    configuration options to the program. To remove a package just the opposite
    should be done.
    Code:
    # apt-get remove packagname
    This will remove the package but may not remove all configuration files. In order for that do instead
    Code:
    # apt-get remove --purge packagename
    Next updating software.
    First:
    Code:
    # apt-get update
    This updates the list of currently installed software, this is the same list that we saw earlier. Next actually updating said list.
    Code:
    # apt-get upgrade
    Now the thing about this command is that it will upgrade to the most recent
    version of all packages on the system. This may or may not always be the best way of doing business. Some packages may not work as well as the older ones. Use with care. use a -s before upgrade to simulate, or see which software will be updated. A better way is to use dist-upgrade
    Code:
    # apt-get dist-upgrade
    This will upgrade all packages with conflict resolution and discarding less important packages for more important ones. There are many other commands but the above should help get you started working with apt. Hope it helps.
    Credits: This tutorial was created with help from the Debian APT How-To which can be found here: Debian -- Debian Documentation Project
    And the man page

    Feel free to add to this thread with your own commands, information, etc.
    To be successful here you should read all of the following.
    ForumRules
    ForumFAQ
    If you are new to Back|Track
    Back|Track Wiki
    Failure to do so will probably get your threads deleted or worse.

  2. #2
    Senior Member orange's Avatar
    Join Date
    Jan 2010
    Posts
    134

    Default

    Code:
    # apt-get autoremove
    This will go through your packages list and checks which packages have been installed that are no longer needed. This is useful to clean up your packages from time to time.

  3. #3
    Member floyd's Avatar
    Join Date
    Mar 2009
    Posts
    231

    Default

    Code:
    # dpkg-reconfigure packagename
    Some packages need to be configured, mostly done when you first download the package. With this command you can reconfigure. If that won't work try a --purge remove and reinstall with apt-get install (see below)

    Oh and don't try to do a
    Code:
    # apt-cache pkgnames > packages.txt
    before a fresh installation and afterwards just apt-get install all the packages from packages.txt again. I think that won't work most of the time. One of my big apt-get mistakes at the beginning
    Auswaertsspiel

  4. #4
    Jenkem Addict imported_wyze's Avatar
    Join Date
    Jul 2007
    Posts
    1,543

    Default

    Equally useful is dpkg -l (which lists installed packages).
    dd if=/dev/swc666 of=/dev/wyze

  5. #5
    Junior Member
    Join Date
    Jun 2009
    Posts
    26

    Default

    thanks man for the post, really helping, now I understand how to deal with apt-get easily

Posting Permissions

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