JustToThePoint English Website Version
JustToThePoint en español
JustToThePoint in Thai

How to clean and maintain your PC.

Let’s see how to automatically clean your Windows

Edit a file (cleanup.bat) on your desktop and double-click on it to clean the junk in your system:

    @echo off
    del /s /f /q c:\windows\temp\*.* # Delete Temporary Files
    rd /s /q c:\windows\temp # It removes the c:\windows\temp directory
    md c:\windows\temp
    del /s /f /q C:\WINDOWS\Prefetch # It removes Windows prefetch (del /s /f /q "%SystemRoot%"\prefetch\* is another option)
    del /s /f /q %temp%\*.*
    rd /s /q %temp% # The TEMP environment variable specifies the location in which most programs place temporary files. The q parameter avoids confirmation prompts to delete files or directories, and s is for deleting all files and subfolders in the temp folder.
    md %temp%
    deltree /y c:\windows\tempor~1
    deltree /y c:\windows\temp
    deltree /y c:\windows\tmp
    deltree /y c:\windows\ff*.tmp
    deltree /y c:\windows\history
    deltree /y c:\windows\cookies
    deltree /y c:\windows\recent
    deltree /y c:\windows\spool\printers
    del c:\WIN386.SWP
    del /s /f /q “%USERPROFILE%\Local Settings\Temporary Internet Files”*.* # It removes temporary internet files
    rd /s /q “%USERPROFILE%\Local Settings\Temporary Internet Files”
    md “%USERPROFILE%\Local Settings\Temporary Internet Files”
    del /s /f /q “%USERPROFILE%\Local Settings\Temp”*.*
    rd /s /q “%USERPROFILE%\Local Settings\Temp”
    md “%USERPROFILE%\Local Settings\Temp”
    del /s /f /q “%USERPROFILE%\Cookies”*.*
    rd /s /q “%USERPROFILE%\Cookies”
    md “%USERPROFILE%\Cookies”
System Monitors

System Monitors

How to clean and maintain your Ubuntu

gedit /root/.bashrc:

  1. alias mantaining=’sudo apt-get update (it resynchronizes the package index files from their sources)
  2. && apt-get -y upgrade (it installs the newest versions of all packages currently installed on the system)
  3. && apt-get -y autoremove (it removes packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed)
  4. && apt-get -y clean (it cleans out the cache of retrieved package files. It removes the files that are no longer required but are still residing on your system)
  5. && rm -rf ~/.cache/thumbnails/* (Clear the thumbnail cache. For each displayed picture, Ubuntu automatically creates a thumbnail for viewing in the file manager)
  6. && updatedb (it creates or updates a database used by locate.

    The “locate” command is the fastest way of searching: locate fileName. The reason is that it is not actually searching your local hard disks, but reads through the mlocate.db database file which contains all file paths in your system). Another slower alternative to find files is: find . -name “fileName

  7. && sudo bleachbit ‐‐clean system.cache system.localizations system.trash system.tmp'

How to clean and maintain your Arch


# The archlinux-keyring package contains the latest keys.
pacman -S archlinux-keyring

# Reflector is a Python script that can retrieve the latest mirror list from the Arch Linux Mirror Status page.
# It selects the 5 most up-to-date mirrors from a specified location, sorts them by speed, and overwrites the file /etc/pacman.d/mirrorlist.
sudo reflector --verbose --country 'Spain' --latest 5 --sort rate --save /etc/pacman.d/mirrorlist

# Update all installed packages and verify their integrity.
sudo pacman -Syyu

# Update UAR packages.
yay -Syu

# Delete Pacman cache.
sudo pacman -Scc

# Delete Yay cache.
yay -Scc

# Delete unwanted dependencies.
yay -Yc

# Remove orphaned packages.
sudo pacman -Rns $(pacman -Qtdq)

# Clean the Cache.
rm -rf .cache/*

# Clean the journal. Journalctl is a utility for displaying logs from journald, systemd's logging service.
sudo journalctl --vacuum-time=2weeks

# Update the database of the files currently on your system. It is used with locale.
sudo updatedb

# Scan for viruses. It checks and removes all the infected files in the home directory.
clamscan --recursive --remove ~

Let’s use rsync to mirror HOME directory to an external drive (/media/mydisk/).

The --delete flag tells rsync to delete any files at the destination that are not currently at the source. -aAXv means that the files are transferred in “archive” mode, which ensures that symbolic links, permissions, ownerships, modification times, ACLs, and extended attributes are preserved.

rsync -aAXv --delete $HOME /media/mydisk/home
Bitcoin donation

JustToThePoint Copyright © 2011 - 2022 PhD. Máximo Núñez Alarcón, Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.