User Tools

Site Tools


linux:dev1_3manage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:dev1_3manage [2026/01/09 21:00] – created azmanlinux:dev1_3manage [2026/01/09 21:05] (current) – [List Installed Packages] azman
Line 6: Line 6:
  
 To automatically update system essentials, <code>$ apt install unattended-upgrades ; dpkg-reconfigure --priority=low unattended-upgrades</code> To automatically update system essentials, <code>$ apt install unattended-upgrades ; dpkg-reconfigure --priority=low unattended-upgrades</code>
 +
 +===== List Installed Packages =====
 +
 +  * Using ''apt'' tool <code>$ apt list --installed 2>/dev/null | grep installed</code> 
 +    * Note that apt will issue a warning when piping its output in shell. Hence, the need to redirect ''stderr'' to ''/dev/null''
 +    * We can further grep away the packages that were automatically installed.
 +  * Using the basic ''dpkg'' tool <code>$ dpkg --get-selections | sed -n 's/^\([^\t]*\)\t.*$/\1/ p'</code> 
 +    * This version, however, only provides package name. 
 +    * To extract similar output from ''apt'' (assuming output was redirected into a file called ''temp.txt''), run <code>$ cat temp.txt | sed -n 's|^\(.*\)/.*$|\1| p'</code>
  
linux/dev1_3manage.1767963624.txt.gz · Last modified: by azman