Command Line Package Management [Debian Based]

you can use ‘apt-get’ tool to manage packages via the CLI instead of using the GUI. ‘apt-get’ can be used to install and uninstall packages as we needed. For your convenience Im going to introduce another CLI tool , ‘dpkg’. Most of you may already have useded it.

Installing a program:

apt-get install

apt-get install

system will check the repositories and install it into the pc from a desired place. By default it will connect your PC to a FTP server and download the required package and its dependencies, then install. This method is highly effective for a good installation.

If you want to install a package which is already saved in your pc,

dpkg -i

dpkg -i

At times you have to download the package source code/binaries and compile it then install. To do that go in to that folder and follow the following steps,

#./configure
#make
#make install

Uninstalling a program:

same tools again!

dpkg --list

dpkg --list

using the above code you can get a list of installed programs.You can use ‘apt-get’ as shown bellow to remove programs,

apt-get remove

apt-get remove

when after performing an ‘apt-get install’, by experience you ll understand that its installing  also other packages as dependencies. We can also remove a program with all its dependencies.

apt-get --purge

apt-get --purge

these are the basics of Linux file management via CLI. Feel free to experiment the commands and rediscover the CLI.
……………..enjoy…………….

%d bloggers like this: