Mostrando postagens com marcador apt-get. Mostrar todas as postagens
Mostrando postagens com marcador apt-get. Mostrar todas as postagens

Oracle JDK 11 error apt-update

 Oracle JDK 11 error when run apt-get update or apt-get upgrade

Run:
sudo rm /var/lib/dpkg/info/oracle-java11-installer-local.postinst

 

 

Clean up boot partition - Ubuntu


1. Check the current kernel version

$ uname -r

It will shows the list like below:

3.19.0-64-generic


2. Remove the OLD kernels

2.a. List the old kernel

$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`

You will get the list of images something like below:
linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic
linux-image-extra-3.19.0-58-generic
linux-image-extra-3.19.0-59-generic
linux-image-extra-3.19.0-61-generic

2.b. Now its time to remove old kernel one by one as

$ sudo apt-get purge linux-image-3.19.0-58-generic
$ sudo apt-get purge linux-image-3.19.0-59-generic
$ sudo apt-get purge linux-image-3.19.0-61-generic
$ sudo apt-get purge linux-image-3.19.0-65-generic


When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:

$ sudo apt-get autoremove




Prevent updating of a specific package


dpkg

Put a package on hold:
echo "<package-name> hold" | sudo dpkg --set-selections
 
Remove the hold:
echo "<package-name> install" | sudo dpkg --set-selections

Display the status of your packages:
dpkg --get-selections

Display the status of a single package:
dpkg --get-selections | grep "<package-name>"

apt

Hold a package:
sudo apt-mark hold <package-name>

Remove the hold:
sudo apt-mark unhold <package-name> 
 
 
 
 

Remove half-installed packages



APT remove half-installed packages

mv /var/lib/dpkg/info/PACKAGE.* /tmp/

dpkg --remove --force-remove-reinstreq PACKAGE

apt-clean

apt update

View apt history


Show recently installed packages 
grep "install " /var/log/dpkg.log
 
Show recently upgraded packages 
grep "upgrade " /var/log/dpkg.log 

Show recently removed packages 
grep "remove " /var/log/dpkg.log 
 
To view info from old log files use zgrep instead grep
zgrep "upgrade " /var/log/dpkg.log.2.gz 
 
 

APT install only security updates

Check security updates:

sudo unattended-upgrade --dry-run -d

If previous command show packages to update:

sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs apt-get install

Adicionar registro DNS windows linha de comando

 Usando o Prompt de Comando (dnscmd)Abra o Prompt de Comando como Administrador e utilize a seguinte estrutura para adicionar um registro do...

Mais vistos