![]() When a package is marked as hold then that package will not be upgraded till it is marked as unhold again. To download a package in the current working directory, run ‘ apt download’ command followed by the package name. To list package dependencies recursively then run ‘ apt rdepends’ followed by package name $ sudo apt rdepends docker 11) Downloading Package without Installing To list package dependencies run ‘ apt depends’ followed by package name $ sudo apt depends phpmyadmin $ sudo apt -purge autoremove 10) List Package Dependencies To view the information about a package, run ‘ apt show’ command followed by package name $ sudo apt show nginxĪutoremove option in apt command is used to remove the packages that were installed automatically to satisfy the dependencies and now no longer needed. $ sudo apt search httpd* 8) View Information About Package To search a package, run ‘ apt search‘ command followed by package name. $ sudo apt full-upgrade 7) Search Package It is generally used when we want to update minor versions of Ubuntu / Debian systems. To upgrade a specific installed package then use following command $ sudo apt install snapd -only-upgrade 6) Full System UpgradeĪlways be careful while upgrading the whole system, as it might remove the installed packages and will install the updated packages. To upgrade all the packages which are currently installed on your system then run ‘ apt upgrade’ command. To remove package and configuration files associated to package then use ‘ apt purge’ $ sudo apt purge nginx 5) Upgrade Package To remove a package then use ‘ apt remove’ command followed by the package name. But when we specify ‘-y’ then it is auto confirm and will install the packages. When we don’t pass ‘-y’ option in ‘apt install’ command then it will prompt you to confirm for its installation. To install a new package, use ‘ apt install‘ command followed by package name, example is shown below: $ sudo apt install nginx ![]() To List only upgradeable packages, run $ sudo apt list -upgradeable 3) Installing New Package ![]() To list only the installed packages, run $ sudo apt list -installed To list all the available packages including installed and upgradeable use apt list command. Thanks for reading, please leave your comment and suggestions in the below comment section.It is always recommended to run this command before installing or upgrading packages. Which specific package did you install recently and which method was used? It's not very often you come across a scenario to install specific package. To list all the installed packages with version, you can use dpkg -l command. If you want to filter the information, you can use the command as below sudo dpkg -l | grep '^ii' | grep virtualbox | awk '' Ii virtualbox-dkms 5.0.40-dfsg-0ubuntu1.16.04.2 all x86 virtualization solution - kernel module sources for dkms Ii virtualbox 5.0.18-dfsg-2build1 amd64 x86 virtualization solution - base binaries Ii unity-scope-virtualbox 0.1+0723-0ubuntu1 all VirtualBox scope for Unity You can do it with the dpkg command combined with grep followed by the name of the package sudo dpkg -l | grep virtualbox You can need to check the version of an installed package. List the installed packages with the versions You can see that it shows the process of the installation but it is a just a simulation. To do that, it is possible to simulate the installation with the -s parameter respecting the syntax sudo apt install -s packageįor example to install a specific version of virtualbox version 5.0.18-dfsg-2build1, type: sudo apt install -s virtualbox=5.0.18-dfsg-2build1 Simulate the installationįor some reason, you could need to make sure that the installation will not encounter any problem. The following additional packages will be installed: Practically, you can do as below: sudo apt install virtualbox=5.0.18-dfsg-2build1 -V The -V parameter helps to have more details about the installation So, you need to follow the syntax as below: apt install package=version -V When you have listed the versions to choose the specific one, you can install it with the apt-get install command followed by the name and the version of the package.
0 Comments
Leave a Reply. |