How to make the best use of apt on Ubuntu and Linux Mint.

This is how to automatically remove unneeded packages on your Linux Mint system.

[email protected]:~$ sudo apt-get autoremove
[sudo] password for jason: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libglib2.0-0:i386 libgstreamer-plugins-base0.10-0 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0
  libgstreamer0.10-0:i386 liborc-0.4-0:i386 libpgm-5.1-0 libpoppler57 libpth20 libsndio6.0 libzmq3
  qtdeclarative5-qtfeedback-plugin qtdeclarative5-ubuntu-web-plugin
0 to upgrade, 0 to newly install, 13 to remove and 17 not to upgrade.
After this operation, 18.6 MB disk space will be freed.
Do you want to continue? [Y/n]

The apt-get check command checks the Linux system for any broken packages.

[email protected]:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done

This is how to download a package without installing it into your system.

homer@deusexmachina ~/Desktop/apt $ sudo apt-get download vile
Get:1 Downloading vile 9.8k-1 [440 kB]                        
Fetched 440 kB in 3s (115 kB/s)

Use the apt-cache command to get some information about your installed packages.

homer@deusexmachina ~/Desktop/apt $ sudo apt-cache stats
Total package names: 56492 (1,130 k)
Total package structures: 96073 (5,380 k)
  Normal packages: 65839
  Pure virtual packages: 1197
  Single virtual packages: 8080
  Mixed virtual packages: 1896
  Missing: 19061
Total distinct versions: 72289 (5,205 k)
Total distinct descriptions: 120110 (2,883 k)
Total dependencies: 559892 (15.7 M)
Total ver/file relations: 76875 (1,845 k)
Total Desc/File relations: 120110 (2,883 k)
Total Provides mappings: 15987 (320 k)
Total globbed strings: 354 (3,658 )
Total dependency version space: 2,703 k
Total slack space: 27.4 k
Total space accounted for: 28.5 M

Remove uneeded deb packages from your system using this command.

homer@deusexmachina ~/Desktop/apt $ sudo apt-get clean

This will free up disk space.

The following command updates your local copy of the packages repository lists.

sudo apt-get update

The following command updates all installed packages that are needing upgrades.

sudo apt-get upgrade
1 responses to “How to make the best use of apt on Ubuntu and Linux Mint.

Leave a Reply