Programming, Ubuntu

Ubuntu Linux Basic System Maintenance Commands

P_20230331_212301_1 (1)

I’m fairly new to Ubuntu Linux since I usually use Windows machines. I recently picked up a Dell XPS 13 plus running Ubuntu with the hopes of getting to know more about the Ubuntu operating system and developing apps on it as well as just in general navigating around in it. So far I really like the operating system, especially the ease of use and lack of bloatware that comes shipped with it (unlike most Windows machines that come heavily loaded with various bloatware).


Read more: Ubuntu Linux Basic System Maintenance Commands

From Dell, I ordered an XPS 13 running a 12th Gen Core i5 with 16GB RAM and a 1 terrabyte SSD hard drive. I also got the OLED screen option which I’m finding makes a huge difference, it’s great! And as I mentioned before, I picked up the Ubuntu linux version which comes bare-bones without bloatware. Got to love a clean computer without all the junk.

One thing I did notice is that the Ubuntu software updates tool doesn’t always work all that well. It gives errors and stalls sometimes. That’s where I found that the command line works well.

Here are the commands I’ve found that help keep your Ubuntu system current and ship-shape. Note that you’ll have to start a terminal window and then enter your password to get this to run:

sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade
sudo apt dist-upgrade
sudo apt autoremove

So what does this all do? Well, like I mentioned it cleans your system and makes sure that you have the latest updates. Here are the details:

sudo apt-get clean

This command clears out old package files in the cache and archives folders. Obviously useful for keeping your hard drive clean and free of old install files.

sudo apt-get update && sudo apt-get upgrade

This is a chained command as you can see by the &&

The sudo apt-get update command downloads the package lists from the repositories and updates them to the newest versions. Then the sudo apt-get upgrade gets the new versions of packages defined by the update command. Basically the ‘update’ command defines the new versions and then the ‘upgrade’ command downloads and installs them.

sudo apt dist-upgrade

This command will upgrade the most important packages, good stuff.

sudo apt autoremove

Super important to keep your system clean. This command will remove packages that are no longer needed ie: dependencies changed. Good to keep your system clean.

So that’s it, with the help of these system commands you should be able to keep your system clean and up to date. Relying on the Ubuntu software updates is not really a good option since it often fails, but these commands will help you keep your system up to date and clean.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s