User Tools

Site Tools


linux:packages

Package managment

The .deb packages management can be done via command line using dpkg or apt-get.

However, in general, prefer the front-end Synaptic which uses apt-get.

Install package

sudo apt-get install package_name

Remove package + unused dependencies

sudo apt-get autoremove package_name

Update packages already installed

Update the index of packages defined in /etc/apt/sources.list:

sudo apt-get update

then update all packages:

sudo apt-get upgrade

If a package can't be updated because there are broken dependencies use first:

sudo apt-get install -f

which permits APT to deduce a likely solution.

If the system's dependency structure is so corrupt as to require manual intervention, it's necessary to eliminate some of the offending packages:

dpkg --remove <name_package>

Cleaning cache

apt-get keeps a .deb copy of all packages currently in use or removed in /var/cache/apt/archives/.

To clear the cache from only the removed packages:

sudo apt-get autoclean

Delete orphan packages

Check the existence of orphan packages:

dpkg -l | egrep "^rc" | cut -d ' ' -f3

Delete orphan packages:

sudo dpkg --purge `dpkg -l | egrep "^rc" | cut -d ' ' -f3`
linux/packages.txt · Last modified: 2020/04/03 09:34 (external edit)