Bootstrap FreeKB - Linux Commands - apt-get (install update packages)
Linux Commands - apt-get (install update packages)

Updated:   |  Linux Commands articles

The apt-cache command can be used to locate a package.


INSTALL

Use the install option to install or update a package.

[root@server1 ~]# apt-get install package_name

 

To install a specific version of a package, add an equal sign followed by the version of the package.

[root@server1 ~]# apt-get install package_name=1.0.11-1

 

The -f option is commonly used, to ensure all package dependencies are installed. For a complete list of available options, refer to the apt-get man page.

[root@server1 ~]# apt-get install -f package_name

 


UNINSTALL

Use the remove option to uninstall a package, but do not remove the configuration files.

[root@server1 ~]# apt-get remove package_name

 

Use the purge option to uninstall a package and remove the configuration files.

[root@server1 ~]# apt-get purge package_name

 

Use the autoremove option to remove a package and the dependencies used by the package.

[root@server1 ~]# apt-get autoremove package_name

 


PACKAGE CONTENTS

Use the apt-file list command to view all of the files installed by the package.

[root@server1 ~]# apt-file list package_name

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 6f1ec4 in the box below so that we can be sure you are a human.