You are not logged in.

#1 2018-05-27 20:57:38

hhh
The Dragon
Registered: 2015-09-17
Posts: 5,361
Website

Basic system maintenance commands

Package Management

To easily keep your system up to date, open a terminal and run the following commands. I do this daily, but weekly or even monthly is sufficient if you're using our stable release. If you have any questions about what apt reports will get upgraded, open a new thread in the Basic Help & Support forum before choosing yes to the 'apt upgrade' prompt...

sudo apt update
sudo apt upgrade

If apt reports that "the following packages are no longer needed"...

sudo apt --purge autoremove

Again, don't run that command without some understanding of what is being removed, so open a Help thread if in doubt!

That's it!

______________

To install a package (gcolor2 in these examples)...

sudo apt install gcolor2

To install a package but not the Debian recommended packages, useful for things like the Nautilus file manager...

sudo apt install --no-install-recommends nautilus

To remove a package and automatically remove no longer needed packages (always post before running this if you have questions, do not run if libc6, gcc+ or network-manager/nm-applet are listed)...

sudo apt purge --autoremove gcolor2

Of course, you can install or remove multiple packages at the same time...

sudo apt purge --autoremove gcolor2 nautilus

That's it!

______________

For more information...

man apt

______________

And some Debian reference pages on package management.
I think this advice:
"The primary command line tool is aptitude. The higher level utility apt-get fulfills a similar purpose and although it is no longer the recommended primary tool, some still use it"
is a bit outdated now, and apt-get is regarded as being equally useful as aptitude in its own way, while apt offers improvements in usability. In particular, it is not recommended to use aptitude for release upgrades.

Anyway, if you want to dive deeper into the tools available on Debian:

https://wiki.debian.org/DebianPackageManagement
https://www.debian.org/doc/manuals/debi … ls.en.html
https://debian-handbook.info/browse/sta … t-get.html

Last edited by johnraff (2018-08-03 06:23:03)

Offline

Board footer

Powered by FluxBB