The Linux (Ubuntu) Commands I keep forgetting

May 03 2017


Delete a directory and all its contents

rm -rf [DirectoryName]

Use this in the parent directory when you are trying to delete a directory so you don't mess it up and nuke the wrong thing


install updates

sudo apt-get update
sudo apt-get upgrade

Update just updates your local list of what packages exist but doesn't actually install anything

Upgrade actually downloads and runs any updates that you found in the update command.


Remove any packages no longer needed

sudo apt-get autoremove

Removes any packages that are no longer needed, stuff that was installed because something needed it but that original thing has been updated and no longer needs it or it has been removed.