When I first got on the Linux boat I only know that apt-get is a command to either install or remove a package from the system and only used the Synaptic Package Manager for searching packages. After a long time using Debian/Ubuntu I got to know some handy apt commands.
Here are the list of apt commands that I know right off the top of my head.
apt-get install [package name]
I think this is the first command that all people learned when they first tried Linux using Debian or Ubuntu. This command will install the package with the package name you entered
This command will update your systems record/cached packages list using the locations in your sources list.
apt-get remove [package name]
If you want to remove a specific package you can use this command.
apt-get purge [package name]
This command is the same as “remove” and will also remove its configuration files.
apt-cache search [package name]
You can use this command if you dont know the exact package name. This will search the package in your systems cached packages and return the results so running apt-get update is advisable before you use this.
This will update all packages that are installed in your system.
This will upgrade your system distribution to the latest one if its already available so this also perform the upgrade command