| 54 | |
| 55 | Some additional useful apt command examples: |
| 56 | * update package feeds: |
| 57 | {{{#!bash |
| 58 | apt-get update |
| 59 | }}} |
| 60 | * upgrade all installed packages to their latest versions: |
| 61 | {{{#!bash |
| 62 | apt-get upgrade |
| 63 | }}} |
| 64 | * show what version of a package is available (regardless of if its installed), for example bluez: |
| 65 | {{{#!bash |
| 66 | apt-cache show bluez |
| 67 | }}} |
| 68 | * clean out any old packages that have newer versions installed and no longer are dependencies of anything else installed: |
| 69 | {{{#!bash |
| 70 | apt-get autoremove |
| 71 | }}} |
| 72 | * clean out apt caches: |
| 73 | {{{#!bash |
| 74 | apt-get clean |
| 75 | }}} |
| 76 | * remove a package (leaves its configs), for example 'bluez': |
| 77 | {{{#!bash |
| 78 | apt-get remove bluez |
| 79 | }}} |
| 80 | * remove a package including any config files (as they normally don't get removed), for example 'bluez': |
| 81 | {{{#!bash |
| 82 | apt-get purge bluez |
| 83 | }}} |
| 84 | * show all available packages including version info: |
| 85 | {{{#!bash |
| 86 | apt list |
| 87 | }}} |
| 88 | * show all installed packages including version info: |
| 89 | {{{#!bash |
| 90 | apt list --installed |
| 91 | }}} |
| 92 | |