Difference between revisions of "Knoppix Remastering Howto Brazilian Portuguese"
From Knoppix Documentation Wiki
(→Configurações do APT) |
(→Configurações do APT) |
||
| Line 99: | Line 99: | ||
*:Nota: Isso foi feito como "chroot" conforme descrito acima. | *:Nota: Isso foi feito como "chroot" conforme descrito acima. | ||
| − | + | Antes de poder adicionar programas, você provavelmente precisará remover alguns pacotes. Para obter uma lista de pacotes instalados, tecle isto: | |
dpkg-query -l | dpkg-query -l | ||
| − | + | Se você está procurando por pacotes instalados pelo tamanho, para eliminar os que ocupam mais espaço, então o comando | |
dpkg-awk "Status: .* installed$" -- Package Installed-Size | \ | dpkg-awk "Status: .* installed$" -- Package Installed-Size | \ | ||
awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \ | awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \ | ||
perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg | perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg | ||
| − | + | vai listar os pacotes em ordem decrescente de tamanho. | |
| − | + | O comando a seguir é, pelo menos, dez vezes mais rápido: | |
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n | dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n | ||
| − | + | e você não precisa de "<tt>dpkg-awk</tt>" ou "<tt>awk</tt>" ou "<tt>perl</tt>"; entretanto, ele não exclui pacotes que não estejam instalados. Se você tiver problemas com o comando "<tt>sort</tt>" acima, tente usar "<tt>KPackage</tt>", expandido em todas as árvores e ordenado pela coluna de tamanho para encontrar os maiores pacotes. | |
| − | + | Ou, você poderia usar este comando para obter velocidade no comando "<tt>dpkg-query</tt>" com os pacotes não-instalados que não forem listados: | |
dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1" "$2}' | dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1" "$2}' | ||
| − | + | Ele faz a mesma coisa anterior, para os que não têm o "<tt>dpkg-awk</tt>". | |
| − | + | Para remover um pacote (e todos os pacotes dependentes dele), tecle isto: | |
apt-get remove --purge ''name-of-package-to-remove'' | apt-get remove --purge ''name-of-package-to-remove'' | ||
| − | + | Para verificar se há pacotes órfãos, tecle isto: | |
deborphan | deborphan | ||
| − | + | Se quer salvar mais espaço retirando os pacotes órfãos, tecle isto (<u>Cuidado</u>: você <u>não</u> será indagado com "yes/no" para confirmar a remoção destes pacotes; quando você pressionar Enter depois deste comando, os pacotes serão eliminados): | |
deborphan | xargs apt-get -y remove | deborphan | xargs apt-get -y remove | ||
If you're uncertain about the previous command and want to see what will happen without making any changes, just add the '''-s''' option to the apt-get command like this (you can do this with all of the apt-get commands, and it's a good habit to use this option before mass operations like this one): | If you're uncertain about the previous command and want to see what will happen without making any changes, just add the '''-s''' option to the apt-get command like this (you can do this with all of the apt-get commands, and it's a good habit to use this option before mass operations like this one): | ||