1. Install a package with apt command
apt install package_name
2. Remove a package with apt command
apt remove package_name
Since remove
command does not delete configuration files, you can use purge
command to remove packages along with their configuration files.
# apt purge package_name
3. apt command to show package details
This command prints the detailed information of a specified package.
# apt show package_name
4. Search for packages with apt command
apt search pattern
5. Update the list of available packages with apt command
apt update
6. apt command to upgrade packages
apt upgrade
To upgrade a particular package, specify the package name.
apt upgrade package_name
7. View the list of upgradable packages using apt command
If you need to view the list of upgradable packages in your system, you can use the following command.
# apt list --upgradable
8. Upgrade the full system with apt command
full-upgrade
command allows you to upgrade the whole system. It will install/remove/upgrade packages if that is required to upgrade the whole system.
apt full-upgrade
9. apt command to remove unused packages
When installing a new package on the system, the package dependencies are automatically installed.
apt autoremove
10. List all packages with apt command
You can use the following command to view the list of all packages that are available for your system.apt list
11. List all installed packages with apt command
This command can help you to get the list of all installed packages on your system.
apt list --installed
12. Check dependencies of package using apt
You can use this command to print the dependencies information of a specified package.
apt depends package_name
13. Avoid Yes/No prompt with apt command
To avoid Yes/No prompt and assume Yes, you can use -y
option.
14. List the policy of a package using apt command
You can use -a
option with list
command to list the policy of a specific package.
apt -a list package_name
15. apt command to edit the source information file
With the following command, you can edit the source information file /etc/apt/sources.list.
# apt edit-sources
---------------------------------
-------------------------------------------
No hay comentarios:
Publicar un comentario