Learn To Manage Packages Using APT-GET & APT-CACHE Commands In Debian/Ubuntu. Part-2

This is second part of the tutorial.You would like to read the first part before you proceed further. Here is the LINK.

Continuing from the first part,

APT Ubuntu

APT Ubuntu

11) Removing Packages From The System Using APT-GET :

This command will help you to remove the installed packages from the system. However, you should note that it won’t remove configuration files at all. Which means, if you remove the application using this command & then re-install it later, then the application settings you had previously will still be there.

Command Syntax :

Example :

 

12) Removing Packages With Configuration Settings Using APT-GET :

Using this command, you can completely remove packages alongwith configuration settings. So, if you will reinstall that application later, you’ll have to reconfigure again. This command can be extremely useful when you’re messing with configuration settings & something goes extremely wrong & you cannot back it up to original state. Removing with this command & re-installing the package can help you in such case.

Command Syntax :

Example :

 

13) Cleaning Up The Disk Space Using APT-GET :

It will cleanup the disk space by cleaning debian packages (.deb) that are downloaded from local repository.

Command :

 

14) Auto Cleaning The Cache Using APT-GET :

The packages which users download is usually stored in /var/cache/apt/archives in form of cache, consuming hefty amount of space. You can simply remove all the .deb cache packages from this directory using this command.

Command :

 

15) Observe The Changelog Of The Package :

Using the following command you can view the changelog of the desired application. It is usually useful to see what new features are included in the latest build or upgrade.

Command Syntax :

Example :

 

16) Fixing Missing Dependencies & Re-installing The Package Using APT-GET :

There are times when you’re having poor internet connectivity, some packages are unable to retrieve but easily can. However, an application depends on some of it’s dependencies, due to such problems it doesn’t meet the require dependency & package won’t get install. So, the following command usually helpful when the dependencies are missing & you want to install the missing dependencies to fix the problem.

Command:

 

17) Auto-Removing The Installed Packages Using APT-GET :

Sometimes, when you remove any package, it’s dependencies are not removed with it. They remain in system as ‘Orphan’. To remove the Orphan packages auto-remove command is used.

Command :

 

18) Checking The Dependencies Of The Application Using APT-GET :

You can check the broken dependencies required for the package you wanna install using the following command. Quite handy, it is!

Command :

 

 

Rest of the commands that are related to APT-CACHE command will be covered in next part. i.e Part-3

Leave a Reply

Your email address will not be published. Required fields are marked *