Wednesday, November 23, 2011
11:18 AM

5 apt-get Option You Should Know (often missed)

apt-get is a small command of linux which have great function that is install application to the system, apt-get (aptitude) is previously used in debian but now it's available in every linux distro (or at least some application with similar functions eg:yum). In ubuntu apt-get is also used by other programs (collaborated) like synaptics and Ubuntu Software Center, but more than that, apt-get it self contain/have important options that are often missed by user. Here a some important apt-get option that you should know

dist-upgrade
Function : this option is use when we need upgrade Package and "Distribution", if you want to upgrade Ubuntu 11.10 to ubuntu 12.04 this is a simple option to get upgraded from terminal, what's differences from upgrade (apt-get upgrade) ?. The dist-upgrade option not only will upgrade all of the currently installed packages but will upgrade all dependencies that depend on its.
Example of using :
apt-get dist-upgrade

--no-install-recommends
Function : this option is use to don't consider recommended packages. When we do apt-get install system will recommends you to install other package that have close function or depend on its, this action will cause you download larger files than you need, when you have a limited connection of course this will be a serious problem. So this option will give you a solution.
Example of using :
apt-get install <name of application>  --no-install-recommends
apt-get install without --no-install-recommends (see additional space will use)
apt-get install with --no-install-recommends (see the different)

--install-suggests
Function : this function is the reverse --no-install-recommends option above, this consider suggested packages as a dependency for installing.
Example of using :
apt-get install <name of application>  --install-suggests

-f, --fix-broken
Function : this option is use when you get broken dependencies when install, remove, or upgrade package, apt-get -f attempt to correct a system with broken dependencies at the time you got broken dependencies. your apt will stop working when get broken dependencies, and this option is a solution to get it run again.
Example of using :
  • apt-get install -f
  • apt-get upgrade -f
  • apt-get dist-upgrade -f
--purge
Function : this function is use to complete remove application/package from your system, complete remove means it's will remove all application including its configuration file. I used to use this option rather than apt-get remove without purge option, remove --purge is equivalent to the purge command.

Example of using : 
apt-get remove --purge <name of application>
There are a lot of necessary option you can find in apt-get, as far as I'm noticed 5 option above is most frequently option that  I usually use and often missed by other.

0 comments:

Post a Comment